Chore: Fix staticcheck issues (#28860)
* Chore: Fix issues reported by staticcheck Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Undo changes Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Chore: Fix issues reported by staticcheck Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix test Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Fix test Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -199,11 +199,11 @@ func (hs *HTTPServer) configureHttps() error {
|
||||
}
|
||||
|
||||
if _, err := os.Stat(setting.CertFile); os.IsNotExist(err) {
|
||||
return fmt.Errorf(`Cannot find SSL cert_file at %v`, setting.CertFile)
|
||||
return fmt.Errorf(`cannot find SSL cert_file at %q`, setting.CertFile)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(setting.KeyFile); os.IsNotExist(err) {
|
||||
return fmt.Errorf(`Cannot find SSL key_file at %v`, setting.KeyFile)
|
||||
return fmt.Errorf(`cannot find SSL key_file at %q`, setting.KeyFile)
|
||||
}
|
||||
|
||||
tlsCfg := &tls.Config{
|
||||
@@ -241,11 +241,11 @@ func (hs *HTTPServer) configureHttp2() error {
|
||||
}
|
||||
|
||||
if _, err := os.Stat(setting.CertFile); os.IsNotExist(err) {
|
||||
return fmt.Errorf(`Cannot find SSL cert_file at %v`, setting.CertFile)
|
||||
return fmt.Errorf(`cannot find SSL cert_file at %q`, setting.CertFile)
|
||||
}
|
||||
|
||||
if _, err := os.Stat(setting.KeyFile); os.IsNotExist(err) {
|
||||
return fmt.Errorf(`Cannot find SSL key_file at %v`, setting.KeyFile)
|
||||
return fmt.Errorf(`cannot find SSL key_file at %q`, setting.KeyFile)
|
||||
}
|
||||
|
||||
tlsCfg := &tls.Config{
|
||||
|
||||
Reference in New Issue
Block a user