func (nt *NodeTable) Remove(key []byte) (success bool, nptr unsafe.Pointer) {
	res := nt.find(key)
	if res.status&ntFoundMask == ntFoundMask {
		success = true
		if res.status == ntFoundInFast {
			nptr = decodePointer(res.fastHTValue)
			if res.hasConflict {
				slowHTValues := nt.slowHT[res.hash]
				v := slowHTValues[0]  
				slowHTValues = append([]uint64(nil), slowHTValues[1:]...)
				nt.slowHTCount--
				var conflict bool
				if len(slowHTValues) == 0 {
					delete(nt.slowHT, res.hash)
					nt.conflicts--
				} else {
					conflict = true
					nt.slowHT[res.hash] = slowHTValues
				}
				nt.fastHT[res.hash] = encodePointer(decodePointer(v), conflict)
			} else {
				delete(nt.fastHT, res.hash)
				nt.fastHTCount--
			}
		} else {
			nptr = decodePointer(res.slowHTValues[res.slowHTPos])
			newSlowValue := append([]uint64(nil), res.slowHTValues[:res.slowHTPos]...)
			if res.slowHTPos+1 != len(res.slowHTValues) {
				newSlowValue = append(newSlowValue, res.slowHTValues[res.slowHTPos+1:]...)
			}
			nt.slowHTCount--
			if len(newSlowValue) == 0 {
				delete(nt.slowHT, res.hash)
				nt.fastHT[res.hash] = encodePointer(decodePointer(nt.fastHT[res.hash]), false)
				nt.conflicts--
			} else {
				nt.slowHT[res.hash] = newSlowValue
			}
		}
	}
	return
}
Remove an item from the nodetable
package nodetable
import "unsafe"
import "fmt"
import "github.com/couchbase/nitro/skiplist"
var emptyResult ntResult
const approxItemSize = 42
var dbInstances *skiplist.Skiplist
func init() {
	dbInstances = skiplist.New()
}
type EqualKeyFn func(unsafe.Pointer, []byte) bool
type HashFn func([]byte) uint32
type NodeTable struct {
	fastHT      map[uint32]uint64
	slowHT      map[uint32][]uint64
	fastHTCount uint64
	slowHTCount uint64
	conflicts   uint64
	hash     HashFn
	keyEqual EqualKeyFn
	res ntResult
}
func CompareNodeTable(a, b unsafe.Pointer) int {
	return int(uintptr(a)) - int(uintptr(b))
}
const (
	ntNotFound    = 0x00
	ntFoundInFast = 0x01
	ntFoundInSlow = 0x03
	ntFoundMask   = 0x01
)
type ntResult struct {
	status         int
	hash           uint32
	hasConflict    bool
	fastHTHasEntry bool
	fastHTValue    uint64
	slowHTValues   []uint64
	slowHTPos      int
}
func New(hfn HashFn, kfn EqualKeyFn) *NodeTable {
	nt := &NodeTable{
		fastHT:   make(map[uint32]uint64),
		slowHT:   make(map[uint32][]uint64),
		hash:     hfn,
		keyEqual: kfn,
	}
	buf := dbInstances.MakeBuf()
	defer dbInstances.FreeBuf(buf)
	dbInstances.Insert(unsafe.Pointer(nt), CompareNodeTable, buf, &dbInstances.Stats)
	return nt
}
func (nt *NodeTable) Stats() string {
	return fmt.Sprintf("{\n"+
		`"FastHTCount":  %d,`+"\n"+
		`"SlowHTCount":  %d,`+"\n"+
		`"Conflicts":   %d,`+"\n"+
		`"MemoryInUse": %d`+"\n}",
		nt.fastHTCount, nt.slowHTCount, nt.conflicts, nt.MemoryInUse())
}
func (nt *NodeTable) MemoryInUse() int64 {
	return int64(approxItemSize * (nt.fastHTCount + nt.slowHTCount))
}
func (nt *NodeTable) Get(key []byte) unsafe.Pointer {
	res := nt.find(key)
	if res.status&ntFoundMask == ntFoundMask {
		if res.status == ntFoundInFast {
			return decodePointer(res.fastHTValue)
		}
		return decodePointer(res.slowHTValues[res.slowHTPos])
	}
	return nil
}
func (nt *NodeTable) Update(key []byte, nptr unsafe.Pointer) (updated bool, oldPtr unsafe.Pointer) {
	res := nt.find(key)
	if res.status&ntFoundMask == ntFoundMask {
		updated = true
		if res.status == ntFoundInFast {
			oldPtr = decodePointer(res.fastHTValue)
			nt.fastHT[res.hash] = encodePointer(nptr, res.hasConflict)
		} else {
			oldPtr = decodePointer(res.slowHTValues[res.slowHTPos])
			res.slowHTValues[res.slowHTPos] = encodePointer(nptr, true)
		}
	} else {
		updated = false
		newSlowValue := res.fastHTHasEntry && !res.hasConflict
		if res.hasConflict || newSlowValue {
			slowHTValues := nt.slowHT[res.hash]
			slowHTValues = append(slowHTValues, encodePointer(nptr, false))
			nt.slowHT[res.hash] = slowHTValues
			if newSlowValue {
				nt.fastHT[res.hash] = encodePointer(decodePointer(nt.fastHT[res.hash]), true)
				nt.conflicts++
			}
			nt.slowHTCount++
		} else {
			nt.fastHT[res.hash] = encodePointer(nptr, false)
			nt.fastHTCount++
		}
	}
	return
}