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

Incorrect set of characters allowed for bare keys #396

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

Incorrect set of characters allowed for bare keys #396

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
The set of characters allowed for bare keys is incorrect.

To Reproduce

type s struct {
	Name string `toml:"Name-àéù"`
	Num  int    `toml:"Num-𝟘"`
}

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

Output:

Name-àéù = "ok"
Num-𝟘 = 0

Expected behavior
Expected output:

"Name-àéù" = "ok"
"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