Skip to content

Commit

Permalink
certnames: rename IsCertificateFile to IsCertificateFilename
Browse files Browse the repository at this point in the history
... since the function does not actually look at the contents of the
file.

Release note: None
  • Loading branch information
knz committed May 31, 2022
1 parent 421e27b commit 8942085
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/security/certificate_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (cl *CertificateLoader) Load() error {
continue
}

if !certnames.IsCertificateFile(filename) {
if !certnames.IsCertificateFilename(filename) {
if log.V(3) {
log.Infof(context.Background(), "skipping non-certificate file %s", filename)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/security/certnames/certnames.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const (
keyExtension = `.key`
)

// IsCertificateFile returns true if the file name looks like a certificate file.
func IsCertificateFile(filename string) bool {
// IsCertificateFilename returns true if the file name looks like a certificate file.
func IsCertificateFilename(filename string) bool {
return strings.HasSuffix(filename, certExtension)
}

Expand Down

0 comments on commit 8942085

Please sign in to comment.