diff options
Diffstat (limited to 'middleware/pkg/tls/tls.go')
-rw-r--r-- | middleware/pkg/tls/tls.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/middleware/pkg/tls/tls.go b/middleware/pkg/tls/tls.go index 7ec30c4ff..62889f542 100644 --- a/middleware/pkg/tls/tls.go +++ b/middleware/pkg/tls/tls.go @@ -50,7 +50,7 @@ func NewTLSConfigFromArgs(args ...string) (*tls.Config, error) { // Client cert, use specified CA c, err = NewTLSConfig(args[0], args[1], args[2]) default: - err = fmt.Errorf("Maximum of three arguments allowed for TLS config, found %d", len(args)) + err = fmt.Errorf("maximum of three arguments allowed for TLS config, found %d", len(args)) } if err != nil { return nil, err @@ -64,7 +64,7 @@ func NewTLSConfigFromArgs(args ...string) (*tls.Config, error) { func NewTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error) { cert, err := tls.LoadX509KeyPair(certPath, keyPath) if err != nil { - return nil, fmt.Errorf("Could not load TLS cert: %s", err) + return nil, fmt.Errorf("could not load TLS cert: %s", err) } roots, err := loadRoots(caPath) @@ -94,11 +94,11 @@ func loadRoots(caPath string) (*x509.CertPool, error) { roots := x509.NewCertPool() pem, err := ioutil.ReadFile(caPath) if err != nil { - return nil, fmt.Errorf("Error reading %s: %s", caPath, err) + return nil, fmt.Errorf("error reading %s: %s", caPath, err) } ok := roots.AppendCertsFromPEM(pem) if !ok { - return nil, fmt.Errorf("Could not read root certs: %s", err) + return nil, fmt.Errorf("could not read root certs: %s", err) } return roots, nil } |