code: func encodeHash(hex string) (string, error) {
  	if len(hex) < 10 {
  		return "", fmt.Errorf("the hex string must contain at least 10 characters")
  	}
  	enc := []rune(hex[:10])
  	for i := range enc {
  		switch enc[i] {
  		case '0':
  			enc[i] = 'g'
  		case '1':
  			enc[i] = 'h'
  		case '3':
  			enc[i] = 'k'
  		case 'a':
  			enc[i] = 'm'
  		case 'e':
  			enc[i] = 't'
  		}
  	}
  	return string(enc), nil
  }
docs: // encodeHash extracts the first 40 bits of the hash from the hex string
  // (1 hex char represents 4 bits), and then maps vowels and vowel-like hex
  // characters to consonants to prevent bad words from being formed (the theory
  // is that no vowels makes it really hard to make bad words). Since the string
  // is hex, the only vowels it can contain are 'a' and 'e'.
  // We picked some arbitrary consonants to map to from the same character set as GenerateName.
  // See: https://github.com/kubernetes/apimachinery/blob/dc1f89aff9a7509782bde3b68824c8043a3e58cc/pkg/util/rand/rand.go#L75
  // If the hex string contains fewer than ten characters, returns an error.