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) {
6262}
6363
6464func getRepoNamesFromCSVString (csv string ) ([]string , error ) {
65- repos := filterEmptyEntries (strings .Split (csv , "," ))
65+ repos := filterEntries (strings .Split (csv , "," ))
6666 if len (repos ) == 0 {
6767 return nil , ErrEmptyRepoList
6868 }
@@ -74,17 +74,17 @@ func getRepoNamesFromFile(file string) ([]string, error) {
7474 if err != nil {
7575 return nil , err
7676 }
77- repos := filterEmptyEntries (strings .Split (string (data ), "\n " ))
77+ repos := filterEntries (strings .Split (string (data ), "\n " ))
7878 if len (repos ) == 0 {
7979 return nil , ErrEmptyRepoList
8080 }
8181 return repos , nil
8282}
8383
84- func filterEmptyEntries (names []string ) []string {
84+ func filterEntries (names []string ) []string {
8585 filtered := []string {}
8686 for _ , name := range names {
87- if name != "" {
87+ if ! strings . HasPrefix ( name , "#" ) && len ( name ) > 0 {
8888 filtered = append (filtered , name )
8989 }
9090 }
You can’t perform that action at this time.
0 commit comments