diff options
Diffstat (limited to 'model')
| -rw-r--r-- | model/tags.go | 4 | ||||
| -rw-r--r-- | model/tags_test.go | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/model/tags.go b/model/tags.go index 9c5035d..8782009 100644 --- a/model/tags.go +++ b/model/tags.go @@ -40,6 +40,10 @@ var ( Override = New("override", "the .override tag will make this target get selected over other targets with the same name. Use this when your machine needs a custom workflow. It is discouraged to check these into version control, as everyone will receive your override.") ) +func (t *Tag) String() string { + return t.Name +} + var TagList []*Tag var TagMap = map[string]*Tag{} diff --git a/model/tags_test.go b/model/tags_test.go index 0ca159b..930717d 100644 --- a/model/tags_test.go +++ b/model/tags_test.go @@ -47,12 +47,12 @@ func (t taggedTarget) ShortestId() string { panic("implement me") } -func tagged(in ...Tag) taggedTarget { +func tagged(in ...*Tag) taggedTarget { return taggedTarget{MyTags: tags(in...)} } -func tags(in ...Tag) Tags { - return Tags(in) +func tags(in ...*Tag) Tags { + return in } func TestTags_Count(t *testing.T) { @@ -91,9 +91,9 @@ func TestTags_AnyOf_EmptySearch(t *testing.T) { func TestTagsFromFilename(t *testing.T) { inputs := []any{ - *Pre, - *Here, - *Final, + Pre, + Here, + Final, } input := fmt.Sprintf("script.%v.%v.%v.ext", inputs...) output := TagsFromFilename(input) |
