Skip to content

Instantly share code, notes, and snippets.



Last active Jun 15, 2020
What would you like to do?
type node struct {
item []byte
key uint64
next *node
func newNode(item []byte) *node {
key, _ := hashstructure.Hash(item, nil)
return &node{
item: item,
key: key,
type list struct {
head *node
size int
func New() *list {
head := &node{
key: 0,
tail := &node{
key: math.MaxUint64,
} = tail
return &list{
head: head,
size: 0,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment