diff options
author | Nick White <git@njw.name> | 2021-05-19 20:03:06 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-05-19 20:03:06 +0100 |
commit | e1a9b682d3a4b4188399c6fd82357d85c92b51aa (patch) | |
tree | 07da82531d73c1b7641c903023002886a411d935 /local.go | |
parent | cc1db86e1e46d4d00d9c24fb3feb6e9286539404 (diff) |
Add basic DeleteObjects implementation to local.go
Diffstat (limited to 'local.go')
-rw-r--r-- | local.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -252,6 +252,18 @@ func (a *LocalConn) Upload(bucket string, key string, path string) error { return err } +// Deletes a list of objects +func (a *LocalConn) DeleteObjects(bucket string, keys []string) error { + for _, v := range keys { + p := filepath.Join(a.TempDir, bucket, v) + err := os.Remove(p) + if err != nil { + return err + } + } + return nil +} + func (a *LocalConn) GetLogger() *log.Logger { return a.Logger } |