func isEmpty(rv reflect.Value, zrv reflect.Value) bool {
	if !rv.IsValid() {
		return true
	}
	if reflect.DeepEqual(rv.Interface(), zrv.Interface()) {
		return true
	}
	switch rv.Kind() {
	case reflect.Slice, reflect.Array, reflect.String:
		if rv.Len() == 0 {
			return true
		}
	}
	return false
}
func isEmpty(rv reflect.Value, zrv reflect.Value) bool {
	if !rv.IsValid() {
		return true
	}
	if reflect.DeepEqual(rv.Interface(), zrv.Interface()) {
		return true
	}
	switch rv.Kind() {
	case reflect.Slice, reflect.Array, reflect.String:
		if rv.Len() == 0 {
			return true
		}
	}
	return false
}
func isEmpty ( rv reflect . Value , zrv reflect . Value ) bool { if ! rv . IsValid ( ) { return true } if reflect . DeepEqual ( rv . Interface ( ) , zrv . Interface ( ) ) { return true } switch rv . Kind ( ) { case reflect . Slice , reflect . Array , reflect . String : if rv . Len ( ) == 0 { return true } } return false }
// For json:",omitempty".
// Returns true for zero values, but also non-nil zero-length slices and strings.
For json : omitempty . Returns true for zero values but also non - nil zero - length slices and strings .