From 9052da66a3cf141cfc53019963f5524b29d426e6 Mon Sep 17 00:00:00 2001 From: Ivan Bertona Date: Fri, 7 Feb 2020 14:42:56 -0500 Subject: [PATCH] Fix linter, tidy go.mod file. --- ca/identity/client.go | 2 +- ca/provisioner.go | 1 + go.mod | 1 - templates/values.go | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ca/identity/client.go b/ca/identity/client.go index d615a019..7daafacd 100644 --- a/ca/identity/client.go +++ b/ca/identity/client.go @@ -23,7 +23,7 @@ func (c *Client) ResolveReference(ref *url.URL) *url.URL { return c.CaURL.ResolveReference(ref) } -// LoadStepClient configures an http.Client with the root in +// LoadClient configures an http.Client with the root in // $STEPPATH/config/defaults.json and the identity defined in // $STEPPATH/config/identity.json func LoadClient() (*Client, error) { diff --git a/ca/provisioner.go b/ca/provisioner.go index 3f86c068..1b7067e0 100644 --- a/ca/provisioner.go +++ b/ca/provisioner.go @@ -118,6 +118,7 @@ func (p *Provisioner) Token(subject string, sans ...string) (string, error) { return tok.SignedString(p.jwk.Algorithm, p.jwk.Key) } +// SSHToken generates a SSH token. func (p *Provisioner) SSHToken(certType, keyID string, principals []string) (string, error) { jwtID, err := randutil.Hex(64) if err != nil { diff --git a/go.mod b/go.mod index 5704c45d..004c50d7 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.13 require ( github.com/Masterminds/sprig/v3 v3.0.0 - github.com/davecgh/go-spew v1.1.1 github.com/go-chi/chi v4.0.2+incompatible github.com/newrelic/go-agent v2.15.0+incompatible github.com/pkg/errors v0.8.1 diff --git a/templates/values.go b/templates/values.go index 505b3b87..ba03267b 100644 --- a/templates/values.go +++ b/templates/values.go @@ -9,6 +9,7 @@ type Step struct { SSH StepSSH } +// StepSSH holds SSH-related values for the CA. type StepSSH struct { HostKey ssh.PublicKey UserKey ssh.PublicKey