Skip to content

Commit

Permalink
fix: cache/gcs dropped errs
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs committed Aug 3, 2023
1 parent a7bf004 commit 4763455
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cache/gcs/gcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ func New(config dict.Dicter) (cache.Interface, error) {
}

gcsCache.Basepath, err = config.String(ConfigKeyBasepath, nil)
if err != nil {
return nil, err
}

defaultMaxZoom := uint(tegola.MaxZ)

gcsCache.MaxZoom, err = config.Uint(ConfigKeyMaxZoom, &defaultMaxZoom)
if err != nil {
return nil, err
}

gcsCache.Ctx = context.Background()
client, err := storage.NewClient(gcsCache.Ctx)
if err != nil {
log.Fatal(err)
return nil, err
}
gcsCache.Client = client
gcsCache.Bucket = client.Bucket(gcsCache.BucketName)
Expand Down

0 comments on commit 4763455

Please sign in to comment.