Skip to content

Commit

Permalink
Fix new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Feb 7, 2024
1 parent 3a8cb70 commit 6b9c0e6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/api/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (p *v1Provider) CreateProjectCommitment(w http.ResponseWriter, r *http.Requ
}
if minConfirmBy := behavior.CommitmentMinConfirmDate; minConfirmBy != nil && minConfirmBy.After(now) {
if req.ConfirmBy == nil || req.ConfirmBy.Before(*minConfirmBy) {
msg := fmt.Sprintf("this commitment needs a `confirm_by` timestamp at or after %s", behavior.CommitmentMinConfirmDate.Format(time.RFC3339))
msg := "this commitment needs a `confirm_by` timestamp at or after " + behavior.CommitmentMinConfirmDate.Format(time.RFC3339)
http.Error(w, msg, http.StatusUnprocessableEntity)
return
}
Expand Down
2 changes: 1 addition & 1 deletion internal/api/quota_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (u QuotaUpdater) validateQuota(srv limes.ServiceInfo, res limesresources.Re
verr = u.validateAuthorization(srv, res, oldQuota, newQuota, lprLimit, lprIsReversible, res.Unit)
if verr != nil {
if verr.Status == http.StatusForbidden {
verr.Message += fmt.Sprintf(" in this %s", u.ScopeType())
verr.Message += " in this " + u.ScopeType()
}
return verr
}
Expand Down
4 changes: 2 additions & 2 deletions internal/plugins/keppel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package plugins

import (
"fmt"
"errors"
"math/big"
"net/http"

Expand Down Expand Up @@ -112,7 +112,7 @@ func (p *keppelPlugin) IsQuotaAcceptableForProject(project core.KeystoneProject,
}
if swiftQuotas["capacity"] == 0 && ourQuotas["images"] > 0 {
//nolint:stylecheck // "Keppel" is a product name and thus must be capitalized
return fmt.Errorf("Keppel can only be used when a nonzero Swift quota is configured")
return errors.New("Keppel can only be used when a nonzero Swift quota is configured")
}
return nil
}
Expand Down

0 comments on commit 6b9c0e6

Please sign in to comment.