aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@mullvad.net>2022-03-28 18:56:41 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-03-28 19:10:49 +0200
commit53e58a58b1a1f9d956d0bdd298419d78f24ced92 (patch)
treeb66d02e7310fcf6106d29881a68bc74c376ebc53
parent4e4a55c54cefbd7e9e5c0915420cba46fa657b8b (diff)
remove redundant characters
-rw-r--r--pkg/types/tree_head.go2
-rw-r--r--pkg/types/tree_head_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/types/tree_head.go b/pkg/types/tree_head.go
index b0214ca..2ddeb08 100644
--- a/pkg/types/tree_head.go
+++ b/pkg/types/tree_head.go
@@ -37,7 +37,7 @@ func (th *TreeHead) toBinary() []byte {
}
func (th *TreeHead) ToBinary(keyHash *Hash) []byte {
- namespace := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize((*keyHash)[:])) // length 88
+ namespace := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize(keyHash[:])) // length 88
b := make([]byte, 6+4+88+4+0+4+6+4+HashSize)
copy(b[0:6], "SSHSIG")
diff --git a/pkg/types/tree_head_test.go b/pkg/types/tree_head_test.go
index 678b935..746820a 100644
--- a/pkg/types/tree_head_test.go
+++ b/pkg/types/tree_head_test.go
@@ -188,7 +188,7 @@ func validTreeHead(t *testing.T) *TreeHead {
}
func validTreeHeadBytes(t *testing.T, keyHash *Hash) []byte {
- ns := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize((*keyHash)[:]))
+ ns := fmt.Sprintf("tree_head:v0:%s@sigsum.org", hex.Serialize(keyHash[:]))
th := bytes.Join([][]byte{
[]byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08},
[]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01},