func omitter(t reflect.Type, tag tag) func(reflect.Value) bool {
	never := func(reflect.Value) bool {
		return false
	}
	if !tag.omitempty {
		return never
	}
	if reflect.PtrTo(t).Implements(isZeroerType) {
		return func(v reflect.Value) bool {
			return v.Addr().Interface().(IsZeroer).IsZero()
		}
	}
	if t.Comparable() {
		zeroVal := reflect.Zero(t).Interface()
		return func(v reflect.Value) bool {
			return v.Interface() == zeroVal
		}
	}
	return never
}
// omitter returns a function that determins if a value
// with the given type and tag should be omitted from
// marshal output. The value passed to the function
// will be the underlying value, not its address.
//
// It returns nil if the value should never be omitted.
omitter returns a function that determins if a value
with the given type and tag should be omitted from
marshal output. The value passed to the function
will be the underlying value, not its address.

It returns nil if the value should never be omitted.
// omitter returns a function that determins if a value // with the given type and tag should be omitted from // marshal output . The value passed to the function // will be the underlying value not its address . // // It returns nil if the value should never be omitted .
func omitter(t reflect.Type, tag tag) func(reflect.Value) bool {
	never := func(reflect.Value) bool {
		return false
	}
	if !tag.omitempty {
		return never
	}
	if reflect.PtrTo(t).Implements(isZeroerType) {
		return func(v reflect.Value) bool {
			return v.Addr().Interface().(IsZeroer).IsZero()
		}
	}
	if t.Comparable() {
		zeroVal := reflect.Zero(t).Interface()
		return func(v reflect.Value) bool {
			return v.Interface() == zeroVal
		}
	}
	return never
}
func omitter ( t reflect . Type , tag tag ) func ( reflect . Value ) bool { never := func ( reflect . Value ) bool { return false } if ! tag . omitempty { return never } if reflect . PtrTo ( t ) . Implements ( isZeroerType ) { return func ( v reflect . Value ) bool { return v . Addr ( ) . Interface ( ) . ( IsZeroer ) . IsZero ( ) } } if t . Comparable ( ) { zeroVal := reflect . Zero ( t ) . Interface ( ) return func ( v reflect . Value ) bool { return v . Interface ( ) == zeroVal } } return never }
omitter returns a function that determins if a value
with the given type and tag should be omitted from
marshal output.
omitter returns a function that determins if a value with the given type and tag should be omitted from marshal output .