File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type Candidate struct {
13
13
}
14
14
15
15
// KubeconfigFilenamePattern defines the name pattern of kubeconfig files
16
- var KubeconfigFilenamePattern = regexp .MustCompile ("^(.*)\\ .kubeconfig$" )
16
+ var KubeconfigFilenamePattern = regexp .MustCompile ("^(.*)\\ .( kubeconfig|config) $" )
17
17
18
18
// ListKubeconfigCandidatesInDir lists all files in dir that matches KubeconfigFilenamePattern
19
19
func ListKubeconfigCandidatesInDir (dir string ) ([]Candidate , error ) {
@@ -37,7 +37,7 @@ func ListKubeconfigCandidatesInDir(dir string) ([]Candidate, error) {
37
37
}
38
38
39
39
matches := KubeconfigFilenamePattern .FindStringSubmatch (file .Name ())
40
- if len (matches ) = = 2 {
40
+ if len (matches ) > = 2 {
41
41
files = append (files , Candidate {
42
42
Name : matches [1 ],
43
43
FullPath : path .Join (dir , file .Name ()),
You can’t perform that action at this time.
0 commit comments