Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile: fix check-fmt target #327

Merged
merged 7 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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