mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 19:08:08 -06:00
further fun
This commit is contained in:
parent
54c4b8de20
commit
18d0685ef1
9 changed files with 77 additions and 50 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue