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