You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm testing out the TOML 1.1 support that's available behind the flag in v1.3.0. the notes mention it can be enabled with either os.Setenv() or setting it explicitly on the command line.
the latter works, but the former doesn't and I'm questioning whether or not I'm misunderstanding it or doing something wrong.
running this directly seem to be validating as TOML 1.0,
➜ go run main.go
panic: toml: line 1 (last key "blah"): newlines not allowed within inline tables
goroutine 1 [running]:
main.main()
/var/folders/qm/fvys1tr11b7130r0zbbbzpx00000gn/T/tmp.sjsn2xa7/main.go:23 +0xd0
exit status 2
but this works,
➜ BURNTSUSHI_TOML_110=somevalue go run main.go; echo $status
0
am I misunderstanding what the release notes are suggesting about using os.Setenv()?
The text was updated successfully, but these errors were encountered:
So this will get run as soon as the package is imported, and your os.Setenv("BURNTSUSHI_TOML_110", "somevalue") happens after that.
This is something I changed after I wrote the release note comment for this. It's kind of obvious that it won't work, but I did both things some weeks apart and it didn't really register 😅
I moved it back in the parse; sorry for the confusion.
I'm testing out the TOML 1.1 support that's available behind the flag in v1.3.0. the notes mention it can be enabled with either
os.Setenv()
or setting it explicitly on the command line.the latter works, but the former doesn't and I'm questioning whether or not I'm misunderstanding it or doing something wrong.
here's a repro case,
running this directly seem to be validating as TOML 1.0,
but this works,
am I misunderstanding what the release notes are suggesting about using
os.Setenv()
?The text was updated successfully, but these errors were encountered: