Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
igoogolx committed Oct 19, 2023
1 parent 9dc84b3 commit 65b3a47
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions pkg/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ import (
"strings"
)

type Lister struct {
Items []string
Mather func(s, i string) bool
}

func (l *Lister) Has(i string) bool {
for _, item := range l.Items {
if l.Mather(item, i) {
return true
}
}
return false
}

func (l *Lister) Insert(s string) error {
l.Items = append(l.Items, s)
return nil
}

func ParseFile(file io.Reader) ([]string, error) {
items := make([]string, 0)
var err error
Expand All @@ -47,10 +28,3 @@ func ParseFile(file io.Reader) ([]string, error) {
}
return items, nil
}

func New(items []string, matcher func(s, i string) bool) *Lister {
return &Lister{
Items: items,
Mather: matcher,
}
}

0 comments on commit 65b3a47

Please sign in to comment.