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())