Skip to content

Commit

Permalink
drop the Endpoint config
Browse files Browse the repository at this point in the history
Signed-off-by: Kengo TODA <skypencil+github@gmail.com>
  • Loading branch information
KengoTODA committed Aug 23, 2022
1 parent 8ad4b7b commit c661d59
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions gcs/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
"os"

gcStorage "cloud.google.com/go/storage"
)
Expand Down Expand Up @@ -44,14 +43,6 @@ func (a Adapter) Write(ctx context.Context, p []byte) error {
}

func NewClient(ctx context.Context, config Config) (Client, error) {
if config.Endpoint == "" {
// https://pkg.go.dev/cloud.google.com/go/storage#hdr-Creating_a_Client
err := os.Setenv("STORAGE_EMULATOR_HOST", config.Endpoint)
if err != nil {
return nil, err
}
}

c, err := gcStorage.NewClient(ctx)
a := &Adapter{
config: config,
Expand Down
2 changes: 0 additions & 2 deletions gcs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ type Config struct {
Bucket string `hcl:"bucket"`
// Path to the migration history file.
Name string `hcl:"name"`

Endpoint string `hcl:"endpoint,optional"`
}

// Config implements a storage.Config.
Expand Down

0 comments on commit c661d59

Please sign in to comment.