coinbase.go
func checkApiErrors(resp response, method string) error {
	if resp.Success == false { // Return errors received from API here
		err := " in " + method + "()"
		if resp.Errors != nil {
			err = strings.Join(resp.Errors, ",") + err
			return errors.New(err)
		}
		if resp.Error != "" { // Return errors received from API here
			err = resp.Error + err
			return errors.New(err)
		}
	}
	return nil
}
func checkApiErrors(resp response, method string) error {
	if resp.Success == false { // Return errors received from API here
		err := " in " + method + "()"
		if resp.Errors != nil {
			err = strings.Join(resp.Errors, ",") + err
			return errors.New(err)
		}
		if resp.Error != "" { // Return errors received from API here
			err = resp.Error + err
			return errors.New(err)
		}
	}
	return nil
}
func checkApiErrors ( resp response , method string ) error { if resp . Success == false { // Return errors received from API here err := " " + method + " " if resp . Errors != nil { err = strings . Join ( resp . Errors , " " ) + err return errors . New ( err ) } if resp . Error != " " { // Return errors received from API here err = resp . Error + err return errors . New ( err ) } } return nil }
// checkApiErrors checks for errors returned by coinbase API JSON response
// i.e { "success": false, "errors": ["Button with code code123456 does not exist"], ...}
checkApiErrors checks for errors returned by coinbase API JSON response i . e { success : false errors : [ Button with code code123456 does not exist ] ... }