mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-27 20:45:56 +00:00
Minor cleanups for staticcheck issues
staticcheck found a couple of minor code cleanup improvements, like unused variables or an out-of-order defer, mostly in tests. This patch fixes those problems by making the necessary adjustments. They're all fairly small, and should not change the logic in any significant way.
This commit is contained in:
@@ -3,8 +3,6 @@ package dkim
|
||||
import (
|
||||
"context"
|
||||
"crypto"
|
||||
"crypto/ed25519"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"testing"
|
||||
@@ -36,7 +34,6 @@ const exampleRSAKeyB64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" +
|
||||
"tdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB"
|
||||
|
||||
var exampleRSAKeyBuf, _ = base64.StdEncoding.DecodeString(exampleRSAKeyB64)
|
||||
var exampleRSAKey, _ = x509.ParsePKCS1PublicKey(exampleRSAKeyBuf)
|
||||
|
||||
// Ed25519 key from the RFC example.
|
||||
// https://datatracker.ietf.org/doc/html/rfc8463#appendix-A.2
|
||||
@@ -44,7 +41,6 @@ const exampleEd25519KeyB64 = "11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="
|
||||
|
||||
var exampleEd25519KeyBuf, _ = base64.StdEncoding.DecodeString(
|
||||
exampleEd25519KeyB64)
|
||||
var exampleEd25519Key = ed25519.PublicKey(exampleEd25519KeyBuf)
|
||||
|
||||
var results = map[string][]string{}
|
||||
var resultErr = map[string]error{}
|
||||
|
||||
Reference in New Issue
Block a user