Skip to content

Commit c5a93ee

Browse files
committed
Error string format rules
1 parent 4d0e183 commit c5a93ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ func (c *Config) InitDefault() error {
140140
if c.TLS != nil {
141141
if _, err := os.Stat(c.TLS.Key); err != nil {
142142
if os.IsNotExist(err) {
143-
return errors.E(op, errors.Errorf("Private key file '%s' does not exist.", c.TLS.Key))
143+
return errors.E(op, errors.Errorf("private key file '%s' does not exist", c.TLS.Key))
144144
}
145145

146146
return errors.E(op, err)
147147
}
148148

149149
if _, err := os.Stat(c.TLS.Cert); err != nil {
150150
if os.IsNotExist(err) {
151-
return errors.E(op, errors.Errorf("Public certificate file '%s' does not exist.", c.TLS.Cert))
151+
return errors.E(op, errors.Errorf("public certificate file '%s' does not exist", c.TLS.Cert))
152152
}
153153

154154
return errors.E(op, err)
@@ -158,7 +158,7 @@ func (c *Config) InitDefault() error {
158158
if c.TLS.RootCA != "" {
159159
if _, err := os.Stat(c.TLS.RootCA); err != nil {
160160
if os.IsNotExist(err) {
161-
return errors.E(op, errors.Errorf("Root CA file '%s' does not exist.", c.TLS.RootCA))
161+
return errors.E(op, errors.Errorf("root CA file '%s' does not exist", c.TLS.RootCA))
162162
}
163163
return errors.E(op, err)
164164
}

0 commit comments

Comments
 (0)