github.com/tomsquest/goreleaser@v0.34.3-0.20171008022654-7d6ef4d338b3/internal/linux/arch.go (about) 1 // Package linux contains functions that are useful to generate linux packages. 2 package linux 3 4 import "strings" 5 6 // Arch converts a goarch to a linux-compatible arch 7 func Arch(key string) string { 8 switch { 9 case strings.Contains(key, "amd64"): 10 return "amd64" 11 case strings.Contains(key, "386"): 12 return "i386" 13 case strings.Contains(key, "arm64"): 14 return "arm64" 15 case strings.Contains(key, "arm6"): 16 return "armhf" 17 } 18 return key 19 }