code: func checkIsHex(s string) error {
  	switch {
  	case s == "":
  		return fmt.Errorf("empty hex string")
  	case len(s)%2 != 0:
  		return fmt.Errorf("uneven number of symbols in the hex string")
  	}
  	for _, c := range s {
  		if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')) {
  			return fmt.Errorf("bad lowercase hex string %q, wrong char %c", s, c)
  		}
  	}
  	return nil
  }
docs: // checkIsHex returns an error if a string is not a lowercase hex string.
  //
  // Empty string is rejected as invalid too.