func batchDelete(client rs.Client, entries []rs.EntryPath) { ret, err := qshell.BatchDelete(client, entries) if err != nil { fmt.Println("Batch delete error", err) } if len(ret) > 0 { for i, entry := range entries { item := ret[i] if item.Data.Error != "" { log.Errorf("Delete '%s' => '%s' Failed, Code: %d", entry.Bucket, entry.Key, item.Code) } else { log.Debug(fmt.Sprintf("Delete '%s' => '%s' Success, Code: %d", entry.Bucket, entry.Key, item.Code)) } } } }
func batchDelete(client rs.Client, entries []rs.EntryPath) { ret, err := qshell.BatchDelete(client, entries) if err != nil { if _, ok := err.(*rpc.ErrorInfo); !ok { fmt.Println("Batch delete error", err) return } } if len(ret) > 0 { for i, entry := range entries { item := ret[i] if item.Data.Error != "" { log.Errorf("Delete '%s' => '%s' failed, Err: %s", entry.Bucket, entry.Key, item.Data.Error) } else { log.Debugf("Delete '%s' => '%s' success", entry.Bucket, entry.Key) } } } }