func validateBase(rp RefreshBase) error {
	var msg []string
	if rp.Architecture == "all" {
		msg = append(msg, fmt.Sprintf("Architecture %q", rp.Architecture))
	}
	if rp.Name == "all" {
		msg = append(msg, fmt.Sprintf("Name %q", rp.Name))
	}
	if rp.Channel == "all" {
		msg = append(msg, fmt.Sprintf("Channel %q", rp.Channel))
	}
	if len(msg) > 0 {
		err := errors.Trace(errors.NotValidf(strings.Join(msg, ", ")))
		// Log the error here, trace on this side gets lost when the error
		// goes thru to the client.
		return logAndReturnError(err)
	}
	return nil
}
// validateBase ensures that we do not pass "all" as part of base.
// This function is to help find programming related failures.
validateBase ensures that we do not pass "all" as part of base.
This function is to help find programming related failures.
// validateBase ensures that we do not pass " all " as part of base . // This function is to help find programming related failures .
func validateBase(rp RefreshBase) error {
	var msg []string
	if rp.Architecture == "all" {
		msg = append(msg, fmt.Sprintf("Architecture %q", rp.Architecture))
	}
	if rp.Name == "all" {
		msg = append(msg, fmt.Sprintf("Name %q", rp.Name))
	}
	if rp.Channel == "all" {
		msg = append(msg, fmt.Sprintf("Channel %q", rp.Channel))
	}
	if len(msg) > 0 {
		err := errors.Trace(errors.NotValidf(strings.Join(msg, ", ")))
		return logAndReturnError(err)
	}
	return nil
}
func validateBase ( rp RefreshBase ) error { var msg [ ] string if rp . Architecture == " " { msg = append ( msg , fmt . Sprintf ( " " , rp . Architecture ) ) } if rp . Name == " " { msg = append ( msg , fmt . Sprintf ( " " , rp . Name ) ) } if rp . Channel == " " { msg = append ( msg , fmt . Sprintf ( " " , rp . Channel ) ) } if len ( msg ) > 0 { err := errors . Trace ( errors . NotValidf ( strings . Join ( msg , " " ) ) ) return logAndReturnError ( err ) } return nil }
validateBase ensures that we do not pass "all" as part of base.
validateBase ensures that we do not pass " all " as part of base .
// Log the error here, trace on this side gets lost when the error // goes thru to the client.