Assume I have the following struct:
type myType struct {
Qid, Interval, RoundNumber string
}
and I have to make sure that a variable of type myType does not have an empty string value for any of the properties.
Is there a more idiomatic way than doing the following if:
if aMyType.Qid == "" || aMyType.Interval == "" || aMyType.RoundNumber == "" {
// handle error situation
}
Obviously the if works but I was wondering whether Go has a better way?