Stopped creating Project and Task with blank name
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
// gotenv.Load()
|
||||
// }
|
||||
|
||||
// GetEnvInt finds an ENV variable and converts to int, otherwise return default value
|
||||
func GetEnvInt(key string, defaultVal int) int {
|
||||
if v, ok := os.LookupEnv(key); ok {
|
||||
if i, err := strconv.Atoi(v); err == nil {
|
||||
@@ -25,6 +26,7 @@ func GetEnvInt(key string, defaultVal int) int {
|
||||
return defaultVal
|
||||
}
|
||||
|
||||
// GetEnvStr finds an ENV variable, otherwise return default value
|
||||
func GetEnvStr(key, defaultVal string) string {
|
||||
if v, ok := os.LookupEnv(key); ok {
|
||||
return v
|
||||
|
||||
Reference in New Issue
Block a user