ci: fix staticcheck failures
Change-Id: I176fb24214755a1940a0a1a4e9cc8e39f184870b
This commit is contained in:
parent
0de1b5fa9f
commit
34db4a80fd
@ -80,7 +80,7 @@ func deleteBucket(cmd *cobra.Command, args []string) (err error) {
|
||||
path := object.Key
|
||||
_, err := project.DeleteObject(ctx, dst.Bucket(), path)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Sprintf("failed to delete encrypted object, cannot empty bucket %q: %+v", dst.Bucket(), err))
|
||||
fmt.Printf("failed to delete encrypted object, cannot empty bucket %q: %+v\n", dst.Bucket(), err)
|
||||
failures++
|
||||
continue
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ func (server *Server) deleteProject(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
if len(buckets.Items) > 0 {
|
||||
http.Error(w, fmt.Sprintf("buckets still exist"), http.StatusConflict)
|
||||
http.Error(w, fmt.Sprintf("buckets still exist: %v", bucketNames(buckets.Items)), http.StatusConflict)
|
||||
return
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ func (server *Server) deleteProject(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
if keys.TotalCount > 0 {
|
||||
http.Error(w, fmt.Sprintf("api-keys still exist"), http.StatusConflict)
|
||||
http.Error(w, fmt.Sprintf("api-keys still exist: count %v", keys.TotalCount), http.StatusConflict)
|
||||
return
|
||||
}
|
||||
|
||||
@ -265,3 +265,11 @@ func (server *Server) deleteProject(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func bucketNames(buckets []storj.Bucket) []string {
|
||||
var xs []string
|
||||
for _, b := range buckets {
|
||||
xs = append(xs, b.Name)
|
||||
}
|
||||
return xs
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ func buildUpdateStatement(update updateNodeStats) string {
|
||||
}
|
||||
atLeastOne = true
|
||||
if update.Suspended.isNil {
|
||||
sql += fmt.Sprintf("suspended = NULL")
|
||||
sql += "suspended = NULL"
|
||||
} else {
|
||||
sql += fmt.Sprintf("suspended = '%v'", update.Suspended.value.Format(time.RFC3339Nano))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user