func ParseAuthConfig(s string) (*AuthConfig, error) {
	if s == "" {
		return nil, ErrAuthStringEmpty
	}

	var a AuthConfig

	if strings.Contains(s, ":") {
		split := strings.SplitN(s, ":", 2)
		a.Username = String(split[0])
		a.Password = String(split[1])
	} else {
		a.Username = String(s)
	}

	return &a, nil
}
func ParseAuthConfig(s string) (*AuthConfig, error) {
	if s == "" {
		return nil, ErrAuthStringEmpty
	}

	var a AuthConfig

	if strings.Contains(s, ":") {
		split := strings.SplitN(s, ":", 2)
		a.Username = String(split[0])
		a.Password = String(split[1])
	} else {
		a.Username = String(s)
	}

	return &a, nil
}
func ParseAuthConfig ( s string ) ( * AuthConfig , error ) { if s == " " { return nil , ErrAuthStringEmpty } var a AuthConfig if strings . Contains ( s , " " ) { split := strings . SplitN ( s , " " , 2 ) a . Username = String ( split [ 0 ] ) a . Password = String ( split [ 1 ] ) } else { a . Username = String ( s ) } return & a , nil }
// ParseAuthConfig parses the auth into username:password.
ParseAuthConfig parses the auth into username : password .