Skip to content

Commit

Permalink
Removing commented out code which no longer applies
Browse files Browse the repository at this point in the history
  • Loading branch information
deckarep committed Jan 14, 2024
1 parent 2d1de38 commit c29dfbe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
6 changes: 0 additions & 6 deletions cmd/utility.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,19 @@ func packageCfg(args []string) (*pkg.ConfigCtx, error) {
return nil, err
}
cfgCtx.PrefixFilter = ast
// Old parser.
//cfgCtx.PrefixFilter = pkg.ParsePrefixFilter("*")
} else {
ast, err := prefixcomp.ParsePrimaryFilter(args[0])
if err != nil {
return nil, err
}
cfgCtx.PrefixFilter = ast
// Old parser.
//cfgCtx.PrefixFilter = pkg.ParsePrefixFilter(args[0])
}
} else {
ast, err := prefixcomp.ParsePrimaryFilter("*")
if err != nil {
return nil, err
}
cfgCtx.PrefixFilter = ast
// Old parser.
//cfgCtx.PrefixFilter = pkg.ParsePrefixFilter("*")
}

// The 1st arg along with the rest - [1:] when provided is a remote command to execute.
Expand Down
33 changes: 0 additions & 33 deletions pkg/config_ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,36 +105,3 @@ func ParseColumns(s string) mapset.Set[string] {

return m
}

//type PrefixFilter struct {
// originalQuery string
// orPrefixes []string
//}
//
//func (p *PrefixFilter) IsAll() bool {
// return len(p.orPrefixes) == 1 && (p.orPrefixes[0] == "*" || p.orPrefixes[0] == "@")
//}
//
//func (p *PrefixFilter) Count() int {
// return len(p.orPrefixes)
//}
//
//func (p *PrefixFilter) PrefixAt(idx int) string {
// return p.orPrefixes[idx]
//}

//func ParsePrefixFilter(s string) *PrefixFilter {
// var prefixes []string
// parts := strings.Split(s, "|")
// for _, p := range parts {
// prefixes = append(prefixes, strings.TrimSpace(p))
// }
//
// slices.Sort(prefixes)
//
// pf := &PrefixFilter{
// originalQuery: s,
// orPrefixes: prefixes,
// }
// return pf
//}

0 comments on commit c29dfbe

Please sign in to comment.