mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
cleanup: address gomnd warnings
Direct usage of numbers should be avoided. Issue reported: mnd: Magic number: X, in <argument> detected (gomnd) Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
@ -151,7 +151,7 @@ func (kms *VaultKMS) GetPassphrase(key string) (string, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode == 404 {
|
||||
if resp.StatusCode == http.StatusNotFound {
|
||||
return "", MissingPassphrase{fmt.Errorf("passphrase for %s not found", key)}
|
||||
}
|
||||
err = kms.processError(resp, fmt.Sprintf("get passphrase for %s", key))
|
||||
@ -219,7 +219,7 @@ func (kms *VaultKMS) DeletePassphrase(key string) error {
|
||||
return fmt.Errorf("delete passphrase at %s request to vault failed: %s", key, err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != 404 {
|
||||
if resp.StatusCode != http.StatusNotFound {
|
||||
err = kms.processError(resp, "delete passphrase")
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user