fix golintci issues

This commit is contained in:
Siyuan Miao 2025-04-07 13:35:56 +02:00
parent 163bf51ad0
commit 1a009afd59
2 changed files with 4 additions and 5 deletions

View File

@ -56,7 +56,7 @@ func (s *CertStore) ensureStorePath() error {
func (s *CertStore) LoadCertificates() {
err := s.ensureStorePath()
if err != nil {
s.log.Errorf(err.Error())
s.log.Errorf(err.Error()) //nolint:errcheck
return
}
@ -150,19 +150,19 @@ func (s *CertStore) saveCertificate(hostname string) {
err := s.ensureStorePath()
if err != nil {
s.log.Errorf(err.Error())
s.log.Errorf(err.Error()) //nolint:errcheck
return
}
keyFile := path.Join(s.storePath, hostname+".key")
crtFile := path.Join(s.storePath, hostname+".crt")
if keyToFile(tlsCert, keyFile); err != nil {
if err := keyToFile(tlsCert, keyFile); err != nil {
s.log.Errorf(err.Error())
return
}
if certToFile(tlsCert, crtFile); err != nil {
if err := certToFile(tlsCert, crtFile); err != nil {
s.log.Errorf(err.Error())
return
}

View File

@ -122,5 +122,4 @@ func RunWebSecureServer() {
if err != nil {
panic(err)
}
return
}