code: func handleMapDiff(key string, originalValue, modifiedValue, patch map[string]interface{},
  	schema LookupPatchMeta, diffOptions DiffOptions) error {
  	subschema, patchMeta, err := schema.LookupPatchMetadataForStruct(key)
  
  	if err != nil {
  		// We couldn't look up metadata for the field
  		// If the values are identical, this doesn't matter, no patch is needed
  		if reflect.DeepEqual(originalValue, modifiedValue) {
  			return nil
  		}
  		// Otherwise, return the error
  		return err
  	}
  	retainKeys, patchStrategy, err := extractRetainKeysPatchStrategy(patchMeta.GetPatchStrategies())
  	if err != nil {
  		return err
  	}
  	diffOptions.BuildRetainKeysDirective = retainKeys
  	switch patchStrategy {
  	// The patch strategic from metadata tells us to replace the entire object instead of diffing it
  	case replaceDirective:
  		if !diffOptions.IgnoreChangesAndAdditions {
  			patch[key] = modifiedValue
  		}
  	default:
  		patchValue, err := diffMaps(originalValue, modifiedValue, subschema, diffOptions)
  		if err != nil {
  			return err
  		}
  		// Maps were not identical, use provided patch value
  		if len(patchValue) > 0 {
  			patch[key] = patchValue
  		}
  	}
  	return nil
  }
docs: // handleMapDiff diff between 2 maps `originalValueTyped` and `modifiedValue`,
  // puts the diff in the `patch` associated with `key`
  // key is the key associated with originalValue and modifiedValue.
  // originalValue, modifiedValue are the old and new value respectively.They are both maps
  // patch is the patch map that contains key and the updated value, and it is the parent of originalValue, modifiedValue
  // diffOptions contains multiple options to control how we do the diff.