Skip to content

Commit 1994508

Browse files
committed
choice: removed MatchS
1 parent 81b1005 commit 1994508

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

pkg/choices/choice.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ func (c Choice) Format() string {
2121
return s
2222
}
2323

24-
func (c *Choice) Match(other Choice) bool {
24+
func (c *Choice) Match(s string) bool {
2525
if c == nil {
2626
return false
2727
}
2828

29+
other := Parse(s)
2930
switch {
3031
case c.Name != "" && c.Name != other.Name,
3132
c.Variant != "" && c.Variant != other.Variant,
@@ -35,13 +36,6 @@ func (c *Choice) Match(other Choice) bool {
3536
return true
3637
}
3738

38-
func (c *Choice) MatchS(s string) bool {
39-
if c == nil {
40-
return false
41-
}
42-
return c.Match(Parse(s))
43-
}
44-
4539
func Parse(s string) Choice {
4640
nameVariant, group, _ := strings.Cut(s, "@")
4741
cName, variant, _ := strings.Cut(nameVariant, "/")

0 commit comments

Comments
 (0)