Ver Fonte

Fix linter, tidy go.mod file.

Ivan Bertona há 6 anos atrás
pai
commit
9052da66a3
4 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 1
      ca/identity/client.go
  2. 1 0
      ca/provisioner.go
  3. 0 1
      go.mod
  4. 1 0
      templates/values.go

+ 1 - 1
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) {

+ 1 - 0
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 {

+ 0 - 1
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

+ 1 - 0
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