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

Add back missing build tag needed for Go 1.16 and earlier #809

Merged
merged 1 commit into from Aug 22, 2022

Conversation

piotrbulinski
Copy link
Contributor

Per https://pkg.go.dev/cmd/go#hdr-Build_constraints:

Go versions 1.16 and earlier used a different syntax for build constraints, with a "// +build" prefix. The gofmt command will add an equivalent //go:build constraint when encountering the older syntax.

Adding the missing "+build" comment, so builds on go 1.16 work.

@pelletier
Copy link
Owner

Good catch, thank you!

@pelletier pelletier added the build Issues regarding go-toml's CI system. label Aug 22, 2022
@pelletier pelletier merged commit 7d69e4a into pelletier:v2 Aug 22, 2022
@piotrbulinski
Copy link
Contributor Author

@pelletier thanks for merging. Do you have a plan for releasing a new version (which would include this change)? Some of my projects builds are currently failing on go 1.16 due to this problem and it would be great to get them running without any workarounds. :)

@piotrbulinski piotrbulinski deleted the v2-go1.16-fix branch August 25, 2022 11:16
@pelletier pelletier added bug Issues describing a bug in go-toml. and removed build Issues regarding go-toml's CI system. labels Aug 26, 2022
@pelletier pelletier changed the title Add missing '+build' comment to fuzz_test.go Add back missing build tag needed for Go 1.16 and earlier Aug 26, 2022
@pelletier
Copy link
Owner

Done :) https://github.com/pelletier/go-toml/releases/tag/v2.0.4

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 this pull request may close these issues.

None yet

2 participants