mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-16 00:17:07 +08:00
25 lines
334 B
Go
25 lines
334 B
Go
//go:build go1.16
|
|
// +build go1.16
|
|
|
|
package middleware
|
|
|
|
import "runtime"
|
|
|
|
func getNormalizedOSName() (os string) {
|
|
switch runtime.GOOS {
|
|
case "android":
|
|
os = "android"
|
|
case "linux":
|
|
os = "linux"
|
|
case "windows":
|
|
os = "windows"
|
|
case "darwin":
|
|
os = "macos"
|
|
case "ios":
|
|
os = "ios"
|
|
default:
|
|
os = "other"
|
|
}
|
|
return os
|
|
}
|