alphabetisation

This commit is contained in:
Lilian Jónsdóttir 2024-01-30 10:43:20 -08:00
parent 7031596aee
commit 867c21722a

View file

@ -13,23 +13,23 @@ import (
// AppConfig contains data to be accessed across the app. // AppConfig contains data to be accessed across the app.
type AppConfig struct { type AppConfig struct {
ListenPort uint16 ListenPort uint16
TemplateCache models.TemplateCache
UseCache bool
Logger *log.Logger Logger *log.Logger
LogLevel log.Level LogLevel log.Level
TemplateCache models.TemplateCache
UseCache bool
} }
// defaluts contains default settings that are used if no environmental variables are set // defaluts contains default settings that are used if no environmental variables are set
var defaults = &AppConfig{ var defaults = &AppConfig{
ListenPort: 9001, ListenPort: 9001,
UseCache: true,
LogLevel: log.InfoLevel, LogLevel: log.InfoLevel,
UseCache: true,
} }
// ConfigDatabase contains data to be loaded from environmental variables // ConfigDatabase contains data to be loaded from environmental variables
type ConfigDatabase struct { type ConfigDatabase struct {
Port uint16 `env:"PORT" env-default:"9001" env-description:"server port"`
LogLevel string `env:"LOGLEVEL" env-default:"warn" env-description:"Logging level. Default: warn, Possible values: debug info warn error fatal none"` LogLevel string `env:"LOGLEVEL" env-default:"warn" env-description:"Logging level. Default: warn, Possible values: debug info warn error fatal none"`
Port uint16 `env:"PORT" env-default:"9001" env-description:"server port"`
UseCache bool `env:"CACHE" env-default:"true" env-description:"Use template cache"` UseCache bool `env:"CACHE" env-default:"true" env-description:"Use template cache"`
} }