config accepts INITIALIZE_SLACK

This commit is contained in:
Bel LaPointe
2024-04-11 17:01:45 -06:00
parent 967d33b03b
commit 052a093ad7
2 changed files with 11 additions and 5 deletions

View File

@@ -11,8 +11,8 @@ import (
)
type Config struct {
Port int
AB string
Port int
InitializeSlack bool
}
func newConfig() (Config, error) {
@@ -55,6 +55,12 @@ func newConfigFromEnv(getEnv func(string) string) (Config, error) {
return Config{}, err
}
m[k] = n
case bool:
got, err := strconv.ParseBool(s)
if err != nil {
return Config{}, err
}
m[k] = got
}
}