type KindVisitor … type GroupKindElement … // Accept calls the Visit method on visitor that corresponds to elem's Kind func (elem GroupKindElement) Accept(visitor KindVisitor) error { … } // GroupMatch returns true if and only if elem's group matches one // of the group arguments func (elem GroupKindElement) GroupMatch(groups ...string) bool { … }