MCPcopy Create free account
hub / github.com/SamNet-dev/snix / archiveName

Function archiveName

cmd/snix/update.go:107–119  ·  view source on GitHub ↗

archiveName maps the current runtime to the release asset filename.

()

Source from the content-addressed store, hash-verified

105
106// archiveName maps the current runtime to the release asset filename.
107func archiveName() string {
108 goarch := runtime.GOARCH
109 goos := runtime.GOOS
110 ext := "tar.gz"
111 if goos == "windows" {
112 ext = "zip"
113 }
114 arch := goarch
115 if goarch == "arm" {
116 arch = "armv7"
117 }
118 return fmt.Sprintf("snix-%s-%s.%s", goos, arch, ext)
119}
120
121// resolveLatest follows the /releases/latest redirect to learn the tag
122// without needing the GitHub API (which is rate-limited for unauth users).

Callers 1

newUpdateCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected