unhashable type []interface #57
Labels
No labels
bug
discussion
documentation
duplicate
ignore
new feature
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
golibs/gms-gods#57
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
type HashSet struct { set *hashset.Set }
func NewHashSet() *HashSet { var result HashSet result.set = hashset.New() return &result }
// If call Add("abc"), it will crash and output "unhashable type []interface", why? func (s *HashSet) Add(items ...interface{}) { s.set.Add(items) }
Thank you.
There is no problem with
gods. The reason cause this problem is the way you use ...interface{} try following:or