func genLoc(str string, first bool) int {
	fourChars := str[:4]
	if !first {
		fourChars = str[:len(str)-4]
	}
	h := fnv.New32a()
	h.Write([]byte(fourChars))
	loc, err := strconv.Atoi(fmt.Sprint(h.Sum32())[:1])
	if err != nil {
		lumber.Error(err, "Failed to convert", fourChars, "to coordinate")
	}
	if loc > 7 {
		return 7
	}
	return loc
}
// Take a string and if it should be the first four or last four characters, get the 32-bit FNV-1a hash encoding of the string
// then convert that long number to a single digit and cap it at 7
Take a string and if it should be the first four or last four characters, get the 32-bit FNV-1a hash encoding of the string
then convert that long number to a single digit and cap it at 7
// Take a string and if it should be the first four or last four characters get the 32 - bit FNV - 1a hash encoding of the string // then convert that long number to a single digit and cap it at 7
func genLoc(str string, first bool) int {
	fourChars := str[:4]
	if !first {
		fourChars = str[:len(str)-4]
	}
	h := fnv.New32a()
	h.Write([]byte(fourChars))
	loc, err := strconv.Atoi(fmt.Sprint(h.Sum32())[:1])
	if err != nil {
		lumber.Error(err, "Failed to convert", fourChars, "to coordinate")
	}
	if loc > 7 {
		return 7
	}
	return loc
}
func genLoc ( str string , first bool ) int { fourChars := str [ : 4 ] if ! first { fourChars = str [ : len ( str ) - 4 ] } h := fnv . New32a ( ) h . Write ( [ ] byte ( fourChars ) ) loc , err := strconv . Atoi ( fmt . Sprint ( h . Sum32 ( ) ) [ : 1 ] ) if err != nil { lumber . Error ( err , " " , fourChars , " " ) } if loc > 7 { return 7 } return loc }
Take a string and if it should be the first four or last four characters, get the 32-bit FNV-1a hash encoding of the string
then convert that long number to a single digit and cap it at 7
Take a string and if it should be the first four or last four characters get the 32 - bit FNV - 1a hash encoding of the string then convert that long number to a single digit and cap it at 7