slack-status-cli/util.go
Ian Fijolek b5782a3d30 Add ability to support multiple workspaces
Adds a new perm to allow fetching the workspace domain
2021-02-03 13:01:53 -08:00

21 lines
285 B
Go

package main
import "os"
func getEnvOrDefault(name, defaultValue string) string {
val, ok := os.LookupEnv(name)
if ok {
return val
}
return defaultValue
}
func fileExists(path string) bool {
if _, err := os.Stat(path); os.IsNotExist(err) {
return false
}
return true
}