Skip to content

Commit 51f5167

Browse files
authored
Punctuation fix for certcache errors. (#377)
errors.Wrap() includes a colon, so the period is redundant.
1 parent 313f2a6 commit 51f5167

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packager/certcache/certcache.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ func (this *CertCache) isHealthy(ocspResp []byte) error {
316316
}
317317
resp, err := ocsp.ParseResponseForCert(ocspResp, this.getCert(), issuer)
318318
if err != nil {
319-
return errors.Wrap(err, "Error parsing OCSP response.")
319+
return errors.Wrap(err, "Error parsing OCSP response")
320320
}
321321
if resp.NextUpdate.Before(time.Now()) {
322322
return errors.Errorf("Cached OCSP is stale, NextUpdate: %v", resp.NextUpdate)
@@ -348,7 +348,7 @@ func (this *CertCache) readOCSPHelper(numTries int, exhaustedRetries bool) ([]by
348348
}
349349
if err := this.isHealthy(ocsp); err != nil {
350350
if exhaustedRetries {
351-
return nil, time.Time{}, errors.Wrap(err, "OCSP failed health check.")
351+
return nil, time.Time{}, errors.Wrap(err, "OCSP failed health check")
352352
} else {
353353
return nil, time.Time{}, nil
354354
}
@@ -801,7 +801,7 @@ func (this *CertCache) reloadCertIfExpired() {
801801
// it doesn't matter because the old certs won't be overridden (and the old certs are probably invalid, too).
802802
certs, err := certloader.LoadAndValidateCertsFromFile(this.CertFile, true)
803803
if err != nil {
804-
log.Println(errors.Wrap(err, "Can't load cert file."))
804+
log.Println(errors.Wrap(err, "Can't load cert file"))
805805
certs = nil
806806
}
807807
if certs != nil {
@@ -810,7 +810,7 @@ func (this *CertCache) reloadCertIfExpired() {
810810

811811
newCerts, err := certloader.LoadAndValidateCertsFromFile(this.NewCertFile, true)
812812
if err != nil {
813-
log.Println(errors.Wrap(err, "Can't load new cert file."))
813+
log.Println(errors.Wrap(err, "Can't load new cert file"))
814814
newCerts = nil
815815
}
816816
if newCerts != nil {
@@ -834,7 +834,7 @@ func PopulateCertCache(config *util.Config, key crypto.PrivateKey,
834834

835835
certs, err := certloader.LoadCertsFromFile(config, developmentMode)
836836
if err != nil {
837-
log.Println(errors.Wrap(err, "Can't load cert file."))
837+
log.Println(errors.Wrap(err, "Can't load cert file"))
838838
certs = nil
839839
}
840840
domain := ""
@@ -849,7 +849,7 @@ func PopulateCertCache(config *util.Config, key crypto.PrivateKey,
849849

850850
certFetcher, err := certloader.CreateCertFetcher(config, key, domain, developmentMode, autoRenewCert)
851851
if err != nil {
852-
return nil, errors.Wrap(err, "creating cert fetcher from config.")
852+
return nil, errors.Wrap(err, "creating cert fetcher from config")
853853
}
854854
certCache := New(certs, certFetcher, []string{domain}, config.CertFile, config.NewCertFile, config.OCSPCache)
855855

0 commit comments

Comments
 (0)