func visitFieldsInMap(ctx *visitorContext, val reflect.Value) (result bool) {
	for _, key := range val.MapKeys() {
		v := val.MapIndex(key)
		if !v.CanInterface() {
			continue
		}

		if ctx.indexedElemPreVisitor != nil {
			ctx.indexedElemPreVisitor(key)
		}

		visRes := visitField(ctx, v.Interface())
		result = visRes || result

		// If the map value is a non-scalar value and the visitor
		// returned false (don't retain), consult the dropNonRequiredMapKeys
		// hint to decide whether we need to delete the key from the map.
		//
		// This is required when splitting bundles into base/overlay
		// bits as empty map values would be encoded as empty objects
		// that the overlay merge code would mis-interpret as deletions.
		if !visRes && isNonScalar(v) && ctx.dropNonRequiredMapKeys {
			val.SetMapIndex(key, reflect.Value{})
		}

		if ctx.indexedElemPostVisitor != nil {
			ctx.indexedElemPostVisitor(key)
		}
	}

	return result
}
// visitFieldsInMap iterates the map specified by val and recursively visits
// each map element. The returned value is the logical OR of the responses
// returned by visiting all map elements.
visitFieldsInMap iterates the map specified by val and recursively visits
each map element. The returned value is the logical OR of the responses
returned by visiting all map elements.
// visitFieldsInMap iterates the map specified by val and recursively visits // each map element . The returned value is the logical OR of the responses // returned by visiting all map elements .
func visitFieldsInMap(ctx *visitorContext, val reflect.Value) (result bool) {
	for _, key := range val.MapKeys() {
		v := val.MapIndex(key)
		if !v.CanInterface() {
			continue
		}
		if ctx.indexedElemPreVisitor != nil {
			ctx.indexedElemPreVisitor(key)
		}
		visRes := visitField(ctx, v.Interface())
		result = visRes || result
		 This is required when splitting bundles into base/overlay
		 bits as empty map values would be encoded as empty objects
		 that the overlay merge code would mis-interpret as deletions.
		if !visRes && isNonScalar(v) && ctx.dropNonRequiredMapKeys {
			val.SetMapIndex(key, reflect.Value{})
		}
		if ctx.indexedElemPostVisitor != nil {
			ctx.indexedElemPostVisitor(key)
		}
	}
	return result
}
func visitFieldsInMap ( ctx * visitorContext , val reflect . Value ) ( result bool ) { for _ , key := range val . MapKeys ( ) { v := val . MapIndex ( key ) if ! v . CanInterface ( ) { continue } if ctx . indexedElemPreVisitor != nil { ctx . indexedElemPreVisitor ( key ) } visRes := visitField ( ctx , v . Interface ( ) ) result = visRes || result if ! visRes && isNonScalar ( v ) && ctx . dropNonRequiredMapKeys { val . SetMapIndex ( key , reflect . Value { } ) } if ctx . indexedElemPostVisitor != nil { ctx . indexedElemPostVisitor ( key ) } } return result }
visitFieldsInMap iterates the map specified by val and recursively visits
each map element.
visitFieldsInMap iterates the map specified by val and recursively visits each map element .
// If the map value is a non-scalar value and the visitor // returned false (don't retain), consult the dropNonRequiredMapKeys // hint to decide whether we need to delete the key from the map. // // This is required when splitting bundles into base/overlay // bits as empty map values would be encoded as empty objects // that the overlay merge code would mis-interpret as deletions.