func Lookup(inVal int64, inArray, outArray []int64) (outVal int64, ok bool) {
	index, ok := Index(inVal, inArray)
	if !ok {
		return 0, false
	}
	return outArray[index], true
}
Lookup finds inVal in inArray and returns the corresponding element in
outArray. Specifically, if inVal == inArray[i], outVal == outArray[i].
ok is true if we find a match, false otherwise.
package util
import (
	"bufio"
	"fmt"
	"log"
	"os"
	"os/user"
	"strconv"
	"unsafe"
	"golang.org/x/sys/unix"
)
func Ptr(slice []byte) unsafe.Pointer {
	if len(slice) == 0 {
		return nil
	}
	return unsafe.Pointer(&slice[0])
}
func ByteSlice(ptr unsafe.Pointer) []byte {
	return (*[1 << 30]byte)(ptr)[:]
}
func PointerSlice(ptr unsafe.Pointer) []unsafe.Pointer {
	return (*[1 << 28]unsafe.Pointer)(ptr)[:]
}
func Index(inVal int64, inArray []int64) (index int, ok bool) {
	for index, val := range inArray {
		if val == inVal {
			return index, true
		}
	}
	return 0, false
}