Skip to content

Commit 40f6f20

Browse files
committedJan 6, 2025·
[init] Fix initializaiton bug for setting params based off of build info
Resolves #114
1 parent ae398ca commit 40f6f20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎client_util.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ func init() {
1818
vcsMod := ""
1919
goArch := ""
2020
goOs := ""
21+
params := url.Values{}
2122
buildInfo, ok := debug.ReadBuildInfo()
2223
if ok {
24+
params.Set("go", buildInfo.GoVersion)
2325
for _, setting := range buildInfo.Settings {
2426
switch setting.Key {
2527
case "vcs.revision":
@@ -34,11 +36,9 @@ func init() {
3436
}
3537
}
3638
}
37-
params := url.Values{}
3839
if vcsMod == "true" {
3940
params.Set("m", "t")
4041
}
41-
params.Set("go", buildInfo.GoVersion)
4242
if goArch != "" {
4343
params.Set("a", goArch)
4444
}

0 commit comments

Comments
 (0)
Please sign in to comment.