convert type to variadic

This commit is contained in:
Niko Storni 2022-11-01 22:28:18 +01:00
parent fa55e82bc1
commit ced09b22ca

View file

@ -443,10 +443,12 @@ const (
type SpecialContentType string type SpecialContentType string
//IsContentSpecial returns true if the claim is of a special content type //IsContentSpecial returns true if the claim is of a special content type
func (c *Claim) IsContentSpecial(specialTag SpecialContentType) bool { func (c *Claim) IsContentSpecial(specialTags ...SpecialContentType) bool {
for _, t := range c.Value.GetTags() { for _, t := range c.Value.GetTags() {
if strings.Contains(t, string(specialTag)) { for _, ct := range specialTags {
return true if strings.Contains(t, string(ct)) {
return true
}
} }
} }
return false return false