diff options
author | 2021-03-03 21:15:20 +0100 | |
---|---|---|
committer | 2021-03-03 21:15:20 +0100 | |
commit | 18d0685ef1947dea66a95a9d5e023ca5b4a39762 (patch) | |
tree | ecaa3734f4cdb0df3185c32fb69708e7d7c04417 /internal/consts/consts.go | |
parent | further yak shaving (diff) | |
download | gotosocial-18d0685ef1947dea66a95a9d5e023ca5b4a39762.tar.xz |
further fun
Diffstat (limited to 'internal/consts/consts.go')
-rw-r--r-- | internal/consts/consts.go | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/internal/consts/consts.go b/internal/consts/consts.go index 92c574a41..8a22e5825 100644 --- a/internal/consts/consts.go +++ b/internal/consts/consts.go @@ -20,11 +20,12 @@ // Don't judge me. package consts -// FlagNames is used for storing the names of the various flags used for +// Flags is used for storing the names of the various flags used for // initializing and storing urfavecli flag variables. -type FlagNames struct { +type Flags struct { LogLevel string ApplicationName string + ConfigPath string DbType string DbAddress string DbPort string @@ -35,38 +36,27 @@ type FlagNames struct { // GetFlagNames returns a struct containing the names of the various flags used for // initializing and storing urfavecli flag variables. -func GetFlagNames() FlagNames { - return FlagNames{ +func GetFlagNames() Flags { + return Flags{ LogLevel: "log-level", ApplicationName: "application-name", + ConfigPath: "config-path", DbType: "db-type", DbAddress: "db-address", DbPort: "db-port", - DbUser: "db-users", + DbUser: "db-user", DbPassword: "db-password", DbDatabase: "db-database", } } -// EnvNames is used for storing the environment variable keys used for -// initializing and storing urfavecli flag variables. -type EnvNames struct { - LogLevel string - ApplicationName string - DbType string - DbAddress string - DbPort string - DbUser string - DbPassword string - DbDatabase string -} - // GetEnvNames returns a struct containing the names of the environment variable keys used for // initializing and storing urfavecli flag variables. -func GetEnvNames() FlagNames { - return FlagNames{ +func GetEnvNames() Flags { + return Flags{ LogLevel: "GTS_LOG_LEVEL", ApplicationName: "GTS_APPLICATION_NAME", + ConfigPath: "GTS_CONFIG_PATH", DbType: "GTS_DB_TYPE", DbAddress: "GTS_DB_ADDRESS", DbPort: "GTS_DB_PORT", |