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 matrix-pretix
*.json
*.sqlite3

View File

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