1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-07 13:31:37 +02:00
goreleaser/uname/uname.go

22 lines
390 B
Go
Raw Normal View History

2016-12-28 22:53:56 -02:00
package uname
var mapping = map[string]string{
2016-12-30 12:03:43 -02:00
"darwin": "Darwin",
"linux": "Linux",
"freebsd": "FreeBSD",
"openbsd": "OpenBSD",
"netbsd": "NetBSD",
2016-12-30 16:52:33 -02:00
"windows": "Windows",
2016-12-30 12:03:43 -02:00
"386": "i386",
"amd64": "x86_64",
2016-12-28 22:53:56 -02:00
}
2016-12-30 12:41:59 -02:00
// FromGo translates GOOS and GOARCH to uname compatibles
2016-12-28 22:53:56 -02:00
func FromGo(s string) string {
result := mapping[s]
if result == "" {
result = s
}
return result
}