diff options
author | 2021-04-20 18:14:23 +0200 | |
---|---|---|
committer | 2021-04-20 18:14:23 +0200 | |
commit | dafc3b5b92865b97be48456e02ad235f4c79cf4e (patch) | |
tree | 0f97edf4377f406df321054d26e731ff5dcc6667 /internal/config | |
parent | Api/v1/statuses (#11) (diff) | |
download | gotosocial-dafc3b5b92865b97be48456e02ad235f4c79cf4e.tar.xz |
linting + organizing
Diffstat (limited to 'internal/config')
-rw-r--r-- | internal/config/config.go | 1 | ||||
-rw-r--r-- | internal/config/default.go | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index a21eaa589..2421290e7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -251,6 +251,7 @@ type Flags struct { StatusesMaxMediaFiles string } +// Defaults contains all the default values for a gotosocial config type Defaults struct { LogLevel string ApplicationName string diff --git a/internal/config/default.go b/internal/config/default.go index 16a7ec46d..b2d82110b 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -96,6 +96,8 @@ func Default() *Config { } } +// GetDefaults returns a populated Defaults struct with most of the values set to reasonable defaults. +// Note that if you use this function, you still need to set Host and, if desired, ConfigPath. func GetDefaults() Defaults { return Defaults{ LogLevel: "info", @@ -136,6 +138,7 @@ func GetDefaults() Defaults { } } +// GetTestDefaults returns a Defaults struct with values set that are suitable for local testing. func GetTestDefaults() Defaults { return Defaults{ LogLevel: "trace", |