libcni conf: support .json file extension
Content of the files are json, the configuration load should support .json
This commit is contained in:
@ -55,7 +55,8 @@ func ConfFiles(dir string) ([]string, error) {
|
||||
if f.IsDir() {
|
||||
continue
|
||||
}
|
||||
if filepath.Ext(f.Name()) == ".conf" {
|
||||
fileExt := filepath.Ext(f.Name())
|
||||
if fileExt == ".conf" || fileExt == ".json" {
|
||||
confFiles = append(confFiles, filepath.Join(dir, f.Name()))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user