|
|
|
@ -186,7 +186,7 @@ func mustParseFloat64(val string) float64 {
|
|
|
|
|
return vv
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// StringsHas checks the target string slice containes src or not
|
|
|
|
|
// StringsHas checks the target string slice contains src or not
|
|
|
|
|
func StringsHas(target []string, src string) bool {
|
|
|
|
|
for _, t := range target {
|
|
|
|
|
if strings.TrimSpace(t) == src {
|
|
|
|
@ -236,7 +236,7 @@ func PathExists(filename string) bool {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//GetEnv retreives the environment variable key. If it does not exist it returns the default.
|
|
|
|
|
//GetEnv retrieves the environment variable key. If it does not exist it returns the default.
|
|
|
|
|
func GetEnv(key string, dfault string, combineWith ...string) string {
|
|
|
|
|
value := os.Getenv(key)
|
|
|
|
|
if value == "" {
|
|
|
|
|