You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hashers.go
    path of file: ./repos/rancher/pkg/auth/tokens/hashers
    
    the code of the file until where you have to start completion: // Package hashers provides the various hash methods whi
    
func GetHashVersion(hash string) (HashVersion, error) {
	splitHash := strings.SplitN(strings.TrimPrefix(hash, "$"), ":", 3)
	if len(splitHash) != 3 {
		return 0, fmt.Errorf("hash format invalid")
	}
	version, err := strconv.Atoi(splitHash[0])
	// this value could in theory be part of a sensitive value, so we don't include it in the error
	if err != nil {
		return 0, fmt.Errorf("unable to convert hash version")
	}
	return HashVersion(version), nil
}