Skip to content

Commit

Permalink
update log.Fatalf usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pleasew8t committed Dec 11, 2024
1 parent 70f3725 commit 772a58d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/cmd/guardiand/keyprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ func runKeyprint(cmd *cobra.Command, args []string) {

f, err := os.Open(keyFile)
if err != nil {
log.Fatalf("failed to open keyfile: %w", err)
log.Fatalf("failed to open keyfile: %v", err)
}

p, err := armor.Decode(f)
if err != nil {
log.Fatalf("failed to read armored file: %w", err)
log.Fatalf("failed to read armored file: %v", err)
}

b, err := io.ReadAll(p.Body)
if err != nil {
log.Fatalf("failed to read file: %w", err)
log.Fatalf("failed to read file: %v", err)
}

var m nodev1.GuardianKey
err = proto.Unmarshal(b, &m)
if err != nil {
log.Fatalf("failed to deserialize protobuf: %w", err)
log.Fatalf("failed to deserialize protobuf: %v", err)
}

fmt.Printf("Guardian key:\n")
Expand Down

0 comments on commit 772a58d

Please sign in to comment.