refactor(cmd): use std runtime package to get go version info (#7964)

* refactor(cmd): use std `runtime` package to get go version info

- Remove the `GoVersion` variable.
- Remove overriding `GoVersion` by ldflags in `build.sh`.
- Get go version, OS and arch from the constants in the std `runtime` package instead of compile time.

* chore(ci): remove `GoVersion` flag from workflows

Remove GoVersion flag from beta_release.yml and build.yml workflows.

> Reduce compile-time dependencies.
This commit is contained in:
Feng.YJ
2025-02-09 18:30:56 +08:00
committed by GitHub
parent f795807753
commit d983a4ebcb
5 changed files with 4 additions and 7 deletions

View File

@ -7,7 +7,6 @@ import (
var (
BuiltAt string
GoVersion string
GitAuthor string
GitCommit string
Version string = "dev"