Skip to content

Commit

Permalink
Prefer path.Join over filepath.Join (#4268)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmanv authored and Ilya Kislenko committed Oct 25, 2018
1 parent 668298a commit 061da67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/objectstore/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package objectstore

import (
"context"
"path/filepath"
"path"

"github.com/graymeta/stow"
"github.com/pkg/errors"
Expand Down Expand Up @@ -49,7 +49,7 @@ func (p *provider) CreateBucket(ctx context.Context, bucketName, region string)
directory: dir,
container: c,
location: location,
hostEndPoint: filepath.Join(p.hostEndPoint, c.ID()),
hostEndPoint: path.Join(p.hostEndPoint, c.ID()),
}
dir.bucket = bucket
return bucket, nil
Expand All @@ -73,7 +73,7 @@ func (p *provider) GetBucket(ctx context.Context, bucketName string) (Bucket, er
directory: dir,
container: c,
location: location,
hostEndPoint: filepath.Join(p.hostEndPoint, c.ID()),
hostEndPoint: path.Join(p.hostEndPoint, c.ID()),
}
dir.bucket = bucket
return bucket, nil
Expand Down Expand Up @@ -101,7 +101,7 @@ func (p *provider) ListBuckets(ctx context.Context) (map[string]Bucket, error) {
directory: dir,
container: c,
location: location,
hostEndPoint: filepath.Join(p.hostEndPoint, c.ID()),
hostEndPoint: path.Join(p.hostEndPoint, c.ID()),
}
dir.bucket = bucket
buckets[c.ID()] = bucket
Expand Down Expand Up @@ -158,7 +158,7 @@ func (p *s3Provider) GetBucket(ctx context.Context, bucketName string) (Bucket,
directory: dir,
container: c,
location: location,
hostEndPoint: filepath.Join(hostEndPoint, c.ID()),
hostEndPoint: path.Join(hostEndPoint, c.ID()),
}
dir.bucket = bucket
return bucket, nil
Expand Down

0 comments on commit 061da67

Please sign in to comment.