diff options
author | Vincent Ambo <tazjin@google.com> | 2019-10-02T17·00+0100 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-10-03T12·21+0100 |
commit | 1308a6e1fd8e5f9cbd0d6b5d872628ec234114d5 (patch) | |
tree | 74e965cb248451252c47e13934be15210040b214 /tools/nixery/server/main.go | |
parent | 0698d7f2aafc62c1ef6fca172668310727fdaef2 (diff) |
refactor(server): Clean up cache implementation
A couple of minor fixes and improvements to the cache implementation.
Diffstat (limited to 'tools/nixery/server/main.go')
-rw-r--r-- | tools/nixery/server/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/nixery/server/main.go b/tools/nixery/server/main.go index c3a0b6460a39..1ff3a471f94f 100644 --- a/tools/nixery/server/main.go +++ b/tools/nixery/server/main.go @@ -81,15 +81,15 @@ func constructLayerUrl(cfg *config.Config, digest string) (string, error) { // // The bucket is required for Nixery to function correctly, hence fatal errors // are generated in case it fails to be set up correctly. -func prepareBucket(ctx *context.Context, cfg *config.Config) *storage.BucketHandle { - client, err := storage.NewClient(*ctx) +func prepareBucket(ctx context.Context, cfg *config.Config) *storage.BucketHandle { + client, err := storage.NewClient(ctx) if err != nil { log.Fatalln("Failed to set up Cloud Storage client:", err) } bkt := client.Bucket(cfg.Bucket) - if _, err := bkt.Attrs(*ctx); err != nil { + if _, err := bkt.Attrs(ctx); err != nil { log.Fatalln("Could not access configured bucket", err) } @@ -194,7 +194,7 @@ func main() { } ctx := context.Background() - bucket := prepareBucket(&ctx, cfg) + bucket := prepareBucket(ctx, cfg) state := builder.NewState(bucket, *cfg) log.Printf("Starting Nixery on port %s\n", cfg.Port) |