go-piv / piv-go

Keys and certificates for YubiKeys, written in Go
Apache License 2.0
367 stars 65 forks source link

Update go.mod #121

Closed udf2457 closed 1 year ago

udf2457 commented 1 year ago

Per #120

Go is presently 1.20 so should bump go.mod to at least 1.18 (20 - 2, per Go release support policy).

stv0g commented 1 year ago

I dont see a need for the bump as long as go-piv does not use any newer language features. Or am I missing something?

udf2457 commented 1 year ago

This is not just a cosmetic issue, per the gomod-ref , this value affects (a) use of new language features (b) behaviour of go command. Bumping the go.mod version has a positive effect on both.

stv0g commented 1 year ago

Hi @udf2457,

Sorry, I can not see an advantage here. Bumping the version only narrows down the minimum version with which the module is compatible. Thats a disadvantage if you want to use go-piv in for example a Go 1.16 code base. As long as no new language features are required, I would keep it as is.

ericchiang commented 1 year ago

I believe @stv0g's assessment is correct. For modules, the go mod version indicates the minimum version you're compatible with. Programs that depend on piv-go who want newer features can specify a higher version in their own mod files.