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

Failure to load TOML data with spaces in a dotted key assignment #401

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

Failure to load TOML data with spaces in a dotted key assignment #401

x-hgg-x opened this issue May 6, 2020 · 0 comments · Fixed by #402
Labels
bug Issues describing a bug in go-toml.

Comments

@x-hgg-x
Copy link
Contributor

x-hgg-x commented May 6, 2020

Describe the bug
Loading produces an error:

(1, 5): was expecting token =, but got "." instead

To Reproduce

_, err := toml.Load(` S1 . 'S2' . "S3" = 3`)
if err != nil {
	fmt.Println(err)
}

Expected behavior
There should be no error according to the TOML specification:

Whitespace around dot-separated parts is ignored.

Versions

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

Additional context
The following code works:

_, err := toml.Load(`[ S1 . 'S2' . "S3" ]`)
if err != nil {
	fmt.Println(err)
}
@pelletier pelletier added the bug Issues describing a bug in go-toml. label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug in go-toml.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants