osname.go (334B)
1 //go:build go1.16 2 // +build go1.16 3 4 package middleware 5 6 import "runtime" 7 8 func getNormalizedOSName() (os string) { 9 switch runtime.GOOS { 10 case "android": 11 os = "android" 12 case "linux": 13 os = "linux" 14 case "windows": 15 os = "windows" 16 case "darwin": 17 os = "macos" 18 case "ios": 19 os = "ios" 20 default: 21 os = "other" 22 } 23 return os 24 }