1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal/linux/arch.go

26 lines
608 B
Go
Raw Normal View History

2017-08-27 18:18:23 +02:00
// 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 {
switch {
case strings.Contains(key, "amd64"):
return "amd64"
case strings.Contains(key, "386"):
return "i386"
case strings.Contains(key, "arm64"):
return "arm64"
case strings.Contains(key, "arm6"):
return "armel"
case strings.Contains(key, "arm7"):
2017-08-27 18:18:23 +02:00
return "armhf"
case strings.Contains(key, "ppc64le"):
return "ppc64le"
case strings.Contains(key, "ppc64"):
return "ppc64"
2017-08-27 18:18:23 +02:00
}
return key
}