Skip to content

Commit

Permalink
chore: use hex instead of fmt for encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonRichardson committed Dec 11, 2024
1 parent 9d22e6f commit 855fcec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/bootstrap/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"crypto/sha256"
"crypto/sha512"
"encoding/hex"
"fmt"
"io"
"net/http"
"net/url"
Expand Down Expand Up @@ -570,7 +569,7 @@ func (b *baseDeployer) calculateLocalCharmHashes(path string, expectedSize int64
return "", "", errors.Errorf("expected %d bytes, got %d", expectedSize, size)
}

sha256 := fmt.Sprintf("%x", hasher256.Sum(nil))
sha256 := hex.EncodeToString(hasher256.Sum(nil))
sha384 := hex.EncodeToString(hasher384.Sum(nil))
return sha256, sha384, nil
}
Expand Down

0 comments on commit 855fcec

Please sign in to comment.