mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 04:31:45 +00:00
ignore example files in configurations
This commit is contained in:
parent
4c11cb4fb2
commit
4340ca271d
@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"io/fs"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"io"
|
||||
"os"
|
||||
@ -13,7 +14,7 @@ func ReadConfigs(cfgPath string) ([]*Config, error) {
|
||||
var configs []*Config
|
||||
|
||||
err := filepath.Walk(cfgPath, func(path string, info fs.FileInfo, err error) error {
|
||||
if info.IsDir() {
|
||||
if info.IsDir() || strings.HasSuffix(info.Name(), ".example.json") {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user