Skip to content

Commit 9f4d890

Browse files
committed
fix: remove redundant path.Join call in Delete method and correct comment in Copy method
1 parent b8be986 commit 9f4d890

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pbm/storage/oss/oss.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ func (o *OSS) List(prefix, suffix string) ([]storage.FileInfo, error) {
175175
// It returns storage.ErrNotExist if a file doesn't exists.
176176
func (o *OSS) Delete(name string) error {
177177
key := path.Join(o.cfg.Prefix, name)
178-
path.Join(o.cfg.Prefix, name)
179178
_, err := o.ossCli.DeleteObject(context.Background(), &oss.DeleteObjectRequest{
180179
Bucket: oss.Ptr(o.cfg.Bucket),
181180
Key: oss.Ptr(key),
@@ -186,7 +185,7 @@ func (o *OSS) Delete(name string) error {
186185
return nil
187186
}
188187

189-
// Copy makes a copy of the src objec/file under dst name
188+
// Copy makes a copy of the src object/file under dst name
190189
func (o *OSS) Copy(src, dst string) error {
191190
uploader := oss.NewCopier(o.ossCli)
192191
_, err := uploader.Copy(context.Background(), &oss.CopyObjectRequest{

0 commit comments

Comments
 (0)