diff --git a/internal/certauthority/certauthority_test.go b/internal/certauthority/certauthority_test.go index ce5e24ed..31251206 100644 --- a/internal/certauthority/certauthority_test.go +++ b/internal/certauthority/certauthority_test.go @@ -36,7 +36,6 @@ var ( ) func TestLoad(t *testing.T) { - tests := []struct { name string cert string diff --git a/internal/concierge/server/server.go b/internal/concierge/server/server.go index a3ede977..fa2e07d3 100644 --- a/internal/concierge/server/server.go +++ b/internal/concierge/server/server.go @@ -256,7 +256,7 @@ func getAggregatedAPIServerConfig( return apiServerConfig, nil } -// main returns an error instead of calling plog.Fatal to allow defer statements to run +// main returns an error instead of calling plog.Fatal to allow defer statements to run. func main() error { defer plog.Setup()() diff --git a/internal/issuer/issuer.go b/internal/issuer/issuer.go index f4a392c5..8023b7e7 100644 --- a/internal/issuer/issuer.go +++ b/internal/issuer/issuer.go @@ -38,7 +38,7 @@ func (c ClientCertIssuers) Name() string { } func (c ClientCertIssuers) IssueClientCertPEM(username string, groups []string, ttl time.Duration) ([]byte, []byte, error) { - var errs []error + errs := make([]error, 0, len(c)) for _, issuer := range c { certPEM, keyPEM, err := issuer.IssueClientCertPEM(username, groups, ttl) diff --git a/internal/issuer/issuer_test.go b/internal/issuer/issuer_test.go index 6ce628bc..114e5f15 100644 --- a/internal/issuer/issuer_test.go +++ b/internal/issuer/issuer_test.go @@ -10,6 +10,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.pinniped.dev/internal/mocks/issuermocks" ) diff --git a/internal/oidc/provider/federation_domain_issuer.go b/internal/oidc/provider/federation_domain_issuer.go index 2cd04e8a..29e3683c 100644 --- a/internal/oidc/provider/federation_domain_issuer.go +++ b/internal/oidc/provider/federation_domain_issuer.go @@ -70,17 +70,17 @@ func (p *FederationDomainIssuer) validate() error { return nil } -// Issuer returns the issuer +// Issuer returns the issuer. func (p *FederationDomainIssuer) Issuer() string { return p.issuer } -// IssuerHost returns the issuerHost +// IssuerHost returns the issuerHost. func (p *FederationDomainIssuer) IssuerHost() string { return p.issuerHost } -// IssuerPath returns the issuerPath +// IssuerPath returns the issuerPath. func (p *FederationDomainIssuer) IssuerPath() string { return p.issuerPath }