Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
skandragon committed Dec 14, 2023
1 parent 8ba0d5e commit 503d8ff
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ import (

func GenerateSymmetricKey() []byte {
sharedKey := make([]byte, 64)
rand.Read(sharedKey)
n, err := rand.Read(sharedKey)
if err != nil {
log.Fatalln(err)
}
if n != len(sharedKey) {
log.Fatal("rand.Rand did not return the correct number of bytes")
}
return sharedKey
}

Expand All @@ -53,7 +59,10 @@ func TestRegister(t *testing.T) {
if err != nil {
log.Fatalf("cannot generate key: %v", err)
}
keyset.AddKey(key)
err = keyset.AddKey(key)
if err != nil {
log.Fatalf("cannot add key: %v", err)
}

type args struct {
purpose string
Expand Down

0 comments on commit 503d8ff

Please sign in to comment.