Skip to content

Commit cbb3859

Browse files
committed
Simplify return
1 parent 6f8d780 commit cbb3859

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/certwatcher/certwatcher.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ func New(certPath, keyPath string) (*CertWatcher, error) {
5959
interval: defaultWatchInterval,
6060
}
6161

62-
// Initial read of certificate and key.
63-
if err := cw.ReadCertificate(); err != nil {
64-
return nil, err
65-
}
66-
67-
return cw, nil
62+
return cw, cw.ReadCertificate()
6863
}
6964

7065
// WithWatchInterval sets the watch interval and returns the CertWatcher pointer

0 commit comments

Comments
 (0)