diff options
Diffstat (limited to 'config/config.go')
| -rw-r--r-- | config/config.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/config/config.go b/config/config.go index f95d3f8..8a61d43 100644 --- a/config/config.go +++ b/config/config.go @@ -29,7 +29,7 @@ type ServerConfig struct { } type StorageConfig struct { - GPXDir string `yaml:"gpx_dir"` + RidesDir string `yaml:"rides_dir"` } type StravaConfig struct { @@ -57,7 +57,7 @@ func Default() Config { Address: "127.0.0.1:8080", PublicURL: "http://localhost:8080", }, - Storage: StorageConfig{GPXDir: "data/rides"}, + Storage: StorageConfig{RidesDir: "data/rides"}, OfficialClimb: OfficialClimbConfig{MatchRadiusM: official_climb.DefaultMatchRadiusM}, Pyroscope: PyroscopeConfig{ ApplicationName: "biking_home", @@ -81,8 +81,8 @@ func Load(filename string) (Config, error) { if config.Server.Address == "" || config.Server.PublicURL == "" { return Config{}, fmt.Errorf("config %q: server.address and server.public_url are required", filename) } - if config.Storage.GPXDir == "" { - return Config{}, fmt.Errorf("config %q: storage.gpx_dir is required", filename) + if config.Storage.RidesDir == "" { + return Config{}, fmt.Errorf("config %q: storage.rides_dir is required", filename) } if config.Pyroscope.Enabled && config.Pyroscope.ApplicationName == "" { return Config{}, fmt.Errorf("config %q: pyroscope.application_name is required when pyroscope is enabled", filename) |
