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 an empty inline table #379

Closed
x-hgg-x opened this issue Apr 28, 2020 · 0 comments · Fixed by #381
Closed

Failure to load an empty inline table #379

x-hgg-x opened this issue Apr 28, 2020 · 0 comments · Fixed by #381

Comments

@x-hgg-x
Copy link
Contributor

x-hgg-x commented Apr 28, 2020

Describe the bug
Loading produces an error:

loading error: (1, 8): unexpected token type in inline table: keys cannot contain } character

To Reproduce

_, err := toml.Load("key = {}")
if err != nil {
	fmt.Println("loading error:", err)
}

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

Within the braces, zero or more comma separated key/value pairs may appear.

Versions

  • go-toml: last version of master (2b8e33f)
  • 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