func ParseToken(header string) (string, error) {
	s := strings.Split(header, " ")
	var value string
	if len(s) < 3 {
		value = s[len(s)-1]
	}
	if value != "" {
		return value, nil
	}
	return value, ErrInvalidToken
}
func ParseToken(header string) (string, error) {
	s := strings.Split(header, " ")
	var value string
	if len(s) < 3 {
		value = s[len(s)-1]
	}
	if value != "" {
		return value, nil
	}
	return value, ErrInvalidToken
}
func ParseToken ( header string ) ( string , error ) { s := strings . Split ( header , " " ) var value string if len ( s ) < 3 { value = s [ len ( s ) - 1 ] } if value != " " { return value , nil } return value , ErrInvalidToken }
// ParseToken extracts token from a header:
// 'type token' or 'token'
ParseToken extracts token from a header : type token or token