what a rabbithole. lots of goodies now.
This commit is contained in:
18
internal/utils.go
Normal file
18
internal/utils.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
`runtime`
|
||||
)
|
||||
|
||||
// GetPathEnvName gets the OS-specific path environment variable name.
|
||||
func GetPathEnvName() (envVarName string) {
|
||||
|
||||
var ok bool
|
||||
|
||||
if envVarName, ok = pathEnvVarName[runtime.GOOS]; !ok {
|
||||
// *NIX/the default.
|
||||
envVarName = "PATH"
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user