File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ func getRepoNamesFromCacheDir(flags *CommonFlags) ([]string, error) {
62
62
}
63
63
64
64
func getRepoNamesFromCSVString (csv string ) ([]string , error ) {
65
- repos := filterEmptyEntries (strings .Split (csv , "," ))
65
+ repos := filterEntries (strings .Split (csv , "," ))
66
66
if len (repos ) == 0 {
67
67
return nil , ErrEmptyRepoList
68
68
}
@@ -74,17 +74,17 @@ func getRepoNamesFromFile(file string) ([]string, error) {
74
74
if err != nil {
75
75
return nil , err
76
76
}
77
- repos := filterEmptyEntries (strings .Split (string (data ), "\n " ))
77
+ repos := filterEntries (strings .Split (string (data ), "\n " ))
78
78
if len (repos ) == 0 {
79
79
return nil , ErrEmptyRepoList
80
80
}
81
81
return repos , nil
82
82
}
83
83
84
- func filterEmptyEntries (names []string ) []string {
84
+ func filterEntries (names []string ) []string {
85
85
filtered := []string {}
86
86
for _ , name := range names {
87
- if name != "" {
87
+ if ! strings . HasPrefix ( name , "#" ) && len ( name ) > 0 {
88
88
filtered = append (filtered , name )
89
89
}
90
90
}
You can’t perform that action at this time.
0 commit comments