1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/uname/uname.go

21 lines
367 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",
"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
}