func (e *Error) Type() string {
	s := e.Error()

	if i := strings.IndexByte(s, ' '); i < 0 {
		s = ""
	} else {
		s = s[:i]

		for _, c := range s {
			if !unicode.IsUpper(c) {
				s = ""
				break
			}
		}
	}

	return s
}
func (e *Error) Type() string {
	s := e.Error()

	if i := strings.IndexByte(s, ' '); i < 0 {
		s = ""
	} else {
		s = s[:i]

		for _, c := range s {
			if !unicode.IsUpper(c) {
				s = ""
				break
			}
		}
	}

	return s
}
func ( e * Error ) Type ( ) string { s := e . Error ( ) if i := strings . IndexByte ( s , ' ' ) ; i < 0 { s = " " } else { s = s [ : i ] for _ , c := range s { if ! unicode . IsUpper ( c ) { s = " " break } } } return s }
// Type returns the RESP error type, which is represented by the leading
// uppercase word in the error string.
Type returns the RESP error type which is represented by the leading uppercase word in the error string .