github.com/creativeprojects/go-selfupdate@v1.2.0/arch.go (about) 1 package selfupdate 2 3 import ( 4 "fmt" 5 ) 6 7 const ( 8 minARM = 5 9 maxARM = 7 10 ) 11 12 // generateAdditionalArch we can use depending on the type of CPU 13 func generateAdditionalArch(arch string, goarm uint8) []string { 14 if arch == "arm" && goarm >= minARM && goarm <= maxARM { 15 additionalArch := make([]string, 0, maxARM-minARM) 16 for v := goarm; v >= minARM; v-- { 17 additionalArch = append(additionalArch, fmt.Sprintf("armv%d", v)) 18 } 19 return additionalArch 20 } 21 if arch == "amd64" { 22 return []string{"x86_64"} 23 } 24 return []string{} 25 }