diff --git a/models/tag.go b/models/tag.go index 8560cb8..a9f37c3 100644 --- a/models/tag.go +++ b/models/tag.go @@ -5,3 +5,8 @@ type Tag struct { Kind TagKind `bson:"kind"` Name string `bson:"name"` } + +// Equal returns true if the tags match one another. +func (tag *Tag) Equal(other Tag) bool { + return tag.Kind == other.Kind && tag.Name == other.Name +}