Which version is uesd now?

List all go version :

g ls
* 1.17.5
  1.23.2

Use specified version:

g use 1.17.5
go version go1.17.5 linux/amd64

Now list the version:

g --version
g version 1.7.0
Built:         2024-07-07 17:54:46
Git branch:    master
Git commit:    5d371085
Go version:    go1.20.14
OS/Arch:       linux/amd64
Experimental:  false

Why the version is g version 1.7.0 ,instead of 1.17.5?

This isn’t specifically related to go; it’s a question about the version manager you’re using. That said, you’re listing the version of the version manager with the version command, not the go version. It says g version 1.7.0, not go version 1.7.0. Read the docs for more info.