From 2973f0ca5fcc31cd02acb09062e8adff330bd7ec Mon Sep 17 00:00:00 2001 From: Loc Nguyen Date: Sun, 24 Nov 2024 19:57:05 +0700 Subject: [PATCH] fix(minor): fmt.Errorf should have len(s) to match templating --- pset01/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pset01/main.go b/pset01/main.go index b751b08..ad1f50a 100644 --- a/pset01/main.go +++ b/pset01/main.go @@ -110,7 +110,7 @@ func HexToPubkey(s string) (PublicKey, error) { // first, make sure hex string is of correct length if len(s) != expectedLength { return p, fmt.Errorf( - "Pubkey string %d characters, expect %d", expectedLength) + "Pubkey string %d characters, expect %d", len(s), expectedLength) } // decode from hex to a byte slice @@ -188,7 +188,7 @@ func HexToSignature(s string) (Signature, error) { // first, make sure hex string is of correct length if len(s) != expectedLength { return sig, fmt.Errorf( - "Pubkey string %d characters, expect %d", expectedLength) + "Signature string %d characters, expect %d", len(s), expectedLength) } // decode from hex to a byte slice