Skip to content

Commit

Permalink
makefile: fix check-fmt target (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonmezonur authored Jul 29, 2021
1 parent 5a611da commit 02f63b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ vet:

.PHONY: check-fmt
check-fmt:
@sh -c 'if [ -n "$(go fmt -mod=vendor ./...)" ]; then echo "Go code is not formatted"; exit 1; fi'
@if [ $$(go fmt -mod=vendor ./...) ]; then\
echo "Go code is not formatted";\
exit 1;\
fi

.PHONY: mock
mock:
Expand Down
1 change: 0 additions & 1 deletion command/mv.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ var moveCommand = &cli.Command{
cacheControl: c.String("cache-control"),
expires: c.String("expires"),


storageOpts: NewStorageOpts(c),
}

Expand Down
24 changes: 12 additions & 12 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ func NewLocalClient(opts Options) *Filesystem {

func NewRemoteClient(ctx context.Context, url *url.URL, opts Options) (*S3, error) {
newOpts := Options{
MaxRetries: opts.MaxRetries,
Endpoint: opts.Endpoint,
NoVerifySSL: opts.NoVerifySSL,
DryRun: opts.DryRun,
MaxRetries: opts.MaxRetries,
Endpoint: opts.Endpoint,
NoVerifySSL: opts.NoVerifySSL,
DryRun: opts.DryRun,
NoSignRequest: opts.NoSignRequest,
bucket: url.Bucket,
region: opts.region,
bucket: url.Bucket,
region: opts.region,
}
return newS3Storage(ctx, newOpts)
}
Expand All @@ -68,13 +68,13 @@ func NewClient(ctx context.Context, url *url.URL, opts Options) (Storage, error)

// Options stores configuration for storage.
type Options struct {
MaxRetries int
Endpoint string
NoVerifySSL bool
DryRun bool
MaxRetries int
Endpoint string
NoVerifySSL bool
DryRun bool
NoSignRequest bool
bucket string
region string
bucket string
region string
}

func (o *Options) SetRegion(region string) {
Expand Down

0 comments on commit 02f63b3

Please sign in to comment.