/ go Public
cmd/go: using newer standard library APIs with an incompatible go version in go.mod does not produce error #47802
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
When using standard library APIs added in 1.17 (
Time.UnixMilli()in my case), I had hoped that the toolchain would ask me to update the
godirective in the go mod file, exactly as it did when adding
reproduction case: https://github.com/bmon/go-mod-time-version/tree/75f34ebbfdc044550c5577a7aef3b86fc7547216
What did you expect to see?
I thought that the toolchain would ask me to modify the go version, exactly as it did with usage of
What did you see instead?
The module builds, and passes
go mod tidyand
go mod vetwithout any issue, despite incorrectly setting the go version in the mod file.
Apologies if this is a duplicate, I spent some time searching but I wasn't able to find an issue matching this request. The closest I found was #30241
The text was updated successfully, but these errors were encountered: