You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
401 B
27 lines
401 B
package config |
|
|
|
import "runtime" |
|
|
|
var supportedPlatforms []string |
|
|
|
func init() { |
|
if runtime.GOOS == "illumos" { |
|
supportedPlatforms = []string{ |
|
"linux", runtime.GOOS, |
|
} |
|
} else { |
|
supportedPlatforms = []string{ |
|
runtime.GOOS, |
|
} |
|
} |
|
} |
|
|
|
func IsPlatformSupported(platform string) bool { |
|
for _, plat := range supportedPlatforms { |
|
if platform == plat { |
|
return true |
|
} |
|
} |
|
|
|
return false |
|
}
|
|
|