fix golintci issues

This commit is contained in:
Siyuan Miao 2025-04-07 13:35:56 +02:00
parent d3e72e5d88
commit 51d3d36486
1 changed files with 4 additions and 4 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
}