Skip to content

Commit

Permalink
fix: supports two bits version for go and uses correct os on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
blurooo committed Aug 27, 2023
1 parent 17e4c98 commit af6b919
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
17 changes: 10 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,27 @@ require (
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
github.com/golang/snappy v0.0.2 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.11.4 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/nwaples/rardecode v1.1.0 // indirect
github.com/pierrec/lz4/v4 v4.1.2 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/schollz/progressbar/v3 v3.13.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/ulikunitz/xz v0.5.9 // indirect
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/net v0.0.0-20211029224645-99673261e6eb // indirect
)

require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/schollz/progressbar/v3 v3.13.1
github.com/stretchr/testify v1.8.4 // indirect
golang.org/x/term v0.11.0 // indirect
)
2 changes: 1 addition & 1 deletion mirrors/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (f files) Pick() *nodeFile {
return file.IsMacArch("arm64")
})
i := slices.IndexFunc(f, func(file *nodeFile) bool {
if hasArmMac {
if runtime.GOOS != "darwin" || hasArmMac {
return file.Match()
}
// uses amd64 instead of arm64
Expand Down
3 changes: 3 additions & 0 deletions sdks/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,8 @@ func getGoModuleVersion(gm string) (string, error) {
if err != nil {
return "", fmt.Errorf("parse %s failed, %w", gm, err)
}
if strings.Count(f.Go.Version, ".") == 1 {
return f.Go.Version + ".0", nil
}
return f.Go.Version, nil
}

0 comments on commit af6b919

Please sign in to comment.