Thank you for the clarification. 

Indeed confirmed that some dependencies "k8s.io/*" specify "go 1.23.0" in 
their go.mod files.

Regards,
Benjamin

On Thursday, January 16, 2025 at 12:27:37 AM UTC Jason Phillips wrote:

> Since Go 1.21, the go directive in go.mod must be greater than or equal to 
> the go directive for all dependencies.
>
> Almost certainly, in the first case there's a dependency that specifies 
> 1.23.0 and in the second case all dependencies are 1.23 or older.
>
>
> Jason
>
> On Wednesday, January 15, 2025 at 12:49:19 PM UTC-5 Benjamin Wang wrote:
>
>> Hello,
>>
>> We set both go and toolchain in go.mod file, see below. But when 
>> executing "go mod tidy" command, it automatically changes "go 1.23" to "go 
>> 1.23.0". The local go version is 1.23.4 (darwin/arm64). see.  
>> https://github.com/etcd-io/etcd-operator/blob/7e8cf49ea8fef6f108084fb55cb437887dc71c3a/tools/mod/go.mod#L3-L5
>>
>> go 1.23
>>
>> toolchain go1.23.4
>>
>> When I execute "go mod tidy" under another project (etcd) on the same 
>> machine with exactly the same go version, it doesn't automatically make the 
>> same change, see 
>> https://github.com/etcd-io/etcd/blob/ce4b4e533d037d8247843cefe2ba4c69cd109097/go.mod#L3-L5
>>
>> Could anyone please explain the reason for the different behaviour? 
>>
>> Regards,
>> Benjamin
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/be48e965-bf07-4b60-9821-c4b697d50710n%40googlegroups.com.

Reply via email to