models: Added Equals method to tag model.

This commit is contained in:
2018-09-20 20:49:57 +02:00
parent 8388ee2446
commit 3c42043ab6
+5
View File
@@ -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
}