Skip to content

Commit

Permalink
refactor(config): clearer function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kad-korpem committed Dec 9, 2024
1 parent c2427ed commit 96a50c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,18 @@ func setDefaults(config *Config) error {
}
if config.OgcAPI.Tiles != nil && config.OgcAPI.Tiles.DatasetTiles != nil && config.OgcAPI.Tiles.DatasetTiles.HealthCheck.Srs == DefaultSrs &&
config.OgcAPI.Tiles.DatasetTiles.HealthCheck.TilePath == nil {
setTilePath(config.OgcAPI.Tiles.DatasetTiles)
setHealthCheckTilePath(config.OgcAPI.Tiles.DatasetTiles)
} else if config.OgcAPI.Tiles != nil && config.OgcAPI.Tiles.Collections != nil {
for _, coll := range config.OgcAPI.Tiles.Collections {
if coll.Tiles.GeoDataTiles.HealthCheck.Srs == DefaultSrs && coll.Tiles.GeoDataTiles.HealthCheck.TilePath == nil {
setTilePath(&coll.Tiles.GeoDataTiles)
setHealthCheckTilePath(&coll.Tiles.GeoDataTiles)
}
}
}
return nil
}

func setTilePath(tilesConfig *Tiles) {
func setHealthCheckTilePath(tilesConfig *Tiles) {
var deepestZoomLevel int
for _, srs := range tilesConfig.SupportedSrs {
if srs.Srs == DefaultSrs {
Expand Down

0 comments on commit 96a50c4

Please sign in to comment.