Explicitly set snake-case name for multi-word config keys

This commit is contained in:
Luca 2022-07-24 04:24:11 +02:00
parent f8479ed7b6
commit eb4fa0b799
2 changed files with 10 additions and 7 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
matrix-pretix
*.json
*.sqlite3

View File

@ -16,17 +16,17 @@ type DatabaseConfig struct {
}
type MatrixConfig struct {
AllowedRooms []string
DisplayName string
LogLevel uint
HomeserverURL string
UserIdentifier string
AllowedRooms []string `json:"allowed_rooms"`
DisplayName string `json:"display_name"`
LogLevel uint `json:"log_level"`
HomeserverURL string `json:"homeserver_url"`
UserIdentifier string `json:"user_identififer"`
Password string
PickleKey string
PickleKey string `json:"pickle_key"`
}
type ServerConfig struct {
ListenAddress string
ListenAddress string `json:"listen_address"`
}
func ParseFromFile(path string) (config *Config, err error) {