github.phpd.cn/goreleaser/goreleaser@v0.92.0/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 "armel"
    17  	case strings.Contains(key, "arm7"):
    18  		return "armhf"
    19  	}
    20  	return key
    21  }