From 7624f62fd2e253125e629386ef344e27bb56b40a Mon Sep 17 00:00:00 2001 From: James Alseth Date: Sun, 30 Jul 2023 16:12:44 -0700 Subject: [PATCH] address feedback Signed-off-by: James Alseth --- pkg/tle/tle.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tle/tle.go b/pkg/tle/tle.go index 63a398430..2e51f5bcc 100644 --- a/pkg/tle/tle.go +++ b/pkg/tle/tle.go @@ -52,17 +52,17 @@ func GenerateTransparencyLogEntry(anon models.LogEntryAnon) (*rekor_pb.Transpare // Different call paths may supply string or []byte. If string, it is base64 encoded. var body []byte - switch x := anon.Body.(type) { + switch v := anon.Body.(type) { case string: - b, err := base64.StdEncoding.DecodeString(x) + b, err := base64.StdEncoding.DecodeString(v) if err != nil { return nil, fmt.Errorf("base64 decoding body: %w", err) } body = b case []byte: - body = x + body = v default: - return nil, fmt.Errorf("body is not string or []byte: (%T)%v", x, x) + return nil, fmt.Errorf("body is not string or []byte: (%T)%v", v, v) } pe, err := models.UnmarshalProposedEntry(bytes.NewReader(body), runtime.JSONConsumer())