lint: improve error handling

This commit is contained in:
Will Norris 2022-01-22 10:29:37 -08:00
parent ef8aec77a9
commit a81add5d96
6 changed files with 9 additions and 5 deletions

View file

@ -9,6 +9,7 @@ import (
"context"
"crypto/md5"
"encoding/hex"
"errors"
"io"
"io/ioutil"
"log"
@ -27,7 +28,7 @@ type cache struct {
func (c *cache) Get(key string) ([]byte, bool) {
r, err := c.object(key).NewReader(ctx)
if err != nil {
if err != storage.ErrObjectNotExist {
if !errors.Is(err, storage.ErrObjectNotExist) {
log.Printf("error reading from gcs: %v", err)
}
return nil, false