Stopped creating Project and Task with blank name

This commit is contained in:
Anis Ahmad
2020-06-06 12:57:29 +06:00
parent 032a53d1c3
commit 62d04b2963
11 changed files with 31 additions and 14 deletions

View File

@@ -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