linting + organizing

This commit is contained in:
tsmethurst
2021-04-20 18:14:23 +02:00
parent 32c5fd987a
commit dafc3b5b92
60 changed files with 746 additions and 390 deletions

View File

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

View File

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