|
|
@@ -3,7 +3,6 @@ package repo |
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"io/ioutil" |
|
|
|
"net/http" |
|
|
|
"path" |
|
|
@@ -90,7 +89,7 @@ func DeleteAllUnzipFile(attachment *models.Attachment, parentDir string) { |
|
|
|
for { |
|
|
|
output, err := storage.ObsCli.ListObjects(input) |
|
|
|
if err == nil { |
|
|
|
fmt.Printf("Page:%d\n", index) |
|
|
|
log.Info("Page:%d\n", index) |
|
|
|
index++ |
|
|
|
for _, val := range output.Contents { |
|
|
|
log.Info("delete obs file:" + val.Key) |
|
|
@@ -106,8 +105,8 @@ func DeleteAllUnzipFile(attachment *models.Attachment, parentDir string) { |
|
|
|
} |
|
|
|
} else { |
|
|
|
if obsError, ok := err.(obs.ObsError); ok { |
|
|
|
fmt.Printf("Code:%s\n", obsError.Code) |
|
|
|
fmt.Printf("Message:%s\n", obsError.Message) |
|
|
|
log.Info("Code:%s\n", obsError.Code) |
|
|
|
log.Info("Message:%s\n", obsError.Message) |
|
|
|
} |
|
|
|
break |
|
|
|
} |
|
|
|