Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables keys are not quoted #397

Closed
x-hgg-x opened this issue May 5, 2020 · 0 comments · Fixed by #400
Closed

Tables keys are not quoted #397

x-hgg-x opened this issue May 5, 2020 · 0 comments · Fixed by #400

Comments

@x-hgg-x
Copy link
Contributor

x-hgg-x commented May 5, 2020

Describe the bug
Tables keys are not quoted.

To Reproduce

type sub struct {
	Num int
}
type s struct {
	SubField sub `toml:"%%%"`
}

t, _ := toml.Marshal(s{sub{0}})
fmt.Println(string(t))

Output:

[%%%]
  Num = 0

Expected behavior
Expected output:

["%%%"]
  Num = 0

Versions

  • go-toml: last version of master (9ccd9bb)
  • go: 1.14
  • operating system: Linux

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant