mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
69c8a502db
* chore(deps): bump github.com/golangci/golangci-lint from 1.23.7 to 1.27.0 Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: tests Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
25 lines
563 B
Go
25 lines
563 B
Go
// Package linux contains functions that are useful to generate linux packages.
|
|
package linux
|
|
|
|
import "strings"
|
|
|
|
// Arch converts a goarch to a linux-compatible arch.
|
|
func Arch(key string) string {
|
|
// XXX: list of all linux arches: `go tool dist list | grep linux`
|
|
var arch = strings.TrimPrefix(key, "linux")
|
|
switch arch {
|
|
case "386":
|
|
return "i386"
|
|
case "amd64":
|
|
return "amd64"
|
|
case "arm5": // GOARCH + GOARM
|
|
return "armel"
|
|
case "arm6": // GOARCH + GOARM
|
|
return "armhf"
|
|
case "arm7": // GOARCH + GOARM
|
|
return "armhf"
|
|
default:
|
|
return arch
|
|
}
|
|
}
|