Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(storage): remove unnecessary variable (#4608)
Variable seems to be duplicating information which led to a bug.
  • Loading branch information
BrennaEpp committed Aug 13, 2021
1 parent 5558855 commit 27fc784
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions storage/storage.go
Expand Up @@ -90,8 +90,6 @@ type Client struct {
raw *raw.Service
// Scheme describes the scheme under the current host.
scheme string
// EnvHost is the host set on the STORAGE_EMULATOR_HOST variable.
envHost string
// ReadHost is the default host used on the reader.
readHost string
}
Expand Down Expand Up @@ -152,7 +150,6 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
hc: hc,
raw: rawService,
scheme: scheme,
envHost: host,
readHost: readHost,
}, nil
}
Expand Down
3 changes: 0 additions & 3 deletions storage/writer.go
Expand Up @@ -125,9 +125,6 @@ func (w *Writer) open() error {
if w.MD5 != nil {
rawObj.Md5Hash = base64.StdEncoding.EncodeToString(w.MD5)
}
if w.o.c.envHost != "" {
w.o.c.raw.BasePath = fmt.Sprintf("%s://%s", w.o.c.scheme, w.o.c.envHost)
}
call := w.o.c.raw.Objects.Insert(w.o.bucket, rawObj).
Media(pr, mediaOpts...).
Projection("full").
Expand Down

0 comments on commit 27fc784

Please sign in to comment.