From 27fc78456fb251652bdf5cdb493734a7e1e643e1 Mon Sep 17 00:00:00 2001 From: Brenna N Epp Date: Fri, 13 Aug 2021 12:03:52 -0500 Subject: [PATCH] fix(storage): remove unnecessary variable (#4608) Variable seems to be duplicating information which led to a bug. --- storage/storage.go | 3 --- storage/writer.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/storage/storage.go b/storage/storage.go index 1b0610e380a..82048923cd5 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -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 } @@ -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 } diff --git a/storage/writer.go b/storage/writer.go index 345f8bdb4c9..e468d5d8e87 100644 --- a/storage/writer.go +++ b/storage/writer.go @@ -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").