Skip to content

Commit 27fc784

Browse files
authored
fix(storage): remove unnecessary variable (#4608)
Variable seems to be duplicating information which led to a bug.
1 parent 5558855 commit 27fc784

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

storage/storage.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ type Client struct {
9090
raw *raw.Service
9191
// Scheme describes the scheme under the current host.
9292
scheme string
93-
// EnvHost is the host set on the STORAGE_EMULATOR_HOST variable.
94-
envHost string
9593
// ReadHost is the default host used on the reader.
9694
readHost string
9795
}
@@ -152,7 +150,6 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
152150
hc: hc,
153151
raw: rawService,
154152
scheme: scheme,
155-
envHost: host,
156153
readHost: readHost,
157154
}, nil
158155
}

storage/writer.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ func (w *Writer) open() error {
125125
if w.MD5 != nil {
126126
rawObj.Md5Hash = base64.StdEncoding.EncodeToString(w.MD5)
127127
}
128-
if w.o.c.envHost != "" {
129-
w.o.c.raw.BasePath = fmt.Sprintf("%s://%s", w.o.c.scheme, w.o.c.envHost)
130-
}
131128
call := w.o.c.raw.Objects.Insert(w.o.bucket, rawObj).
132129
Media(pr, mediaOpts...).
133130
Projection("full").

0 commit comments

Comments
 (0)