code: func ParseHtpasswd(htpasswdBytes []byte) (passwords HashedPasswords, err error) {
  	lines := strings.Split(string(htpasswdBytes), LineSeparator)
  	passwords = make(map[string]string)
  	for lineNumber, line := range lines {
  		// scan lines
  		line = strings.Trim(line, " ")
  		if len(line) == 0 {
  			// skipping empty lines
  			continue
  		}
  		parts := strings.Split(line, PasswordSeparator)
  		if len(parts) != 2 {
  			err = errors.New(fmt.Sprintln("invalid line", lineNumber+1, "unexpected number of parts split by", PasswordSeparator, len(parts), "instead of 2 in\"", line, "\""))
  			return
  		}
  		for i, part := range parts {
  			parts[i] = strings.Trim(part, " ")
  		}
  		_, alreadyExists := passwords[parts[0]]
  		if alreadyExists {
  			err = errors.New("invalid htpasswords file - user " + parts[0] + " was already defined")
  			return
  		}
  		passwords[parts[0]] = parts[1]
  	}
  	return
  }
docs: // ParseHtpasswd parse htpasswd bytes