package main import "github.com/yukimochi/Activity-Relay/models" func contains(entries interface{}, finder string) bool { switch entry := entries.(type) { case string: return entry == finder case []string: for i := 0; i < len(entry); i++ { if entry[i] == finder { return true } } case []models.Subscription: for i := 0; i < len(entry); i++ { if entry[i].Domain == finder { return true } } return false } return false }