Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The author asks about using the same hash function as the builtin Go map. This was recently exposed in the standard lib at https://golang.org/pkg/hash/maphash/

Specifically https://golang.org/src/hash/maphash/maphash.go?s=1316:1346#L... links to the internal hash function.



Right, but you can only write strings or bytes to the hash, not integers, booleans, structs, etc. So the problem remains.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: