code: func CreateTwoWayMergePatch(original, modified []byte, dataStruct interface{}, fns ...PreconditionFunc) ([]byte, error) {
  	originalMap := map[string]interface{}{}
  	if len(original) > 0 {
  		if err := json.Unmarshal(original, &originalMap); err != nil {
  			return nil, errBadJSONDoc
  		}
  	}
  
  	modifiedMap := map[string]interface{}{}
  	if len(modified) > 0 {
  		if err := json.Unmarshal(modified, &modifiedMap); err != nil {
  			return nil, errBadJSONDoc
  		}
  	}
  
  	t, err := getTagStructType(dataStruct)
  	if err != nil {
  		return nil, err
  	}
  
  	patchMap, err := diffMaps(originalMap, modifiedMap, t, false, false)
  	if err != nil {
  		return nil, err
  	}
  
  	// Apply the preconditions to the patch, and return an error if any of them fail.
  	for _, fn := range fns {
  		if !fn(patchMap) {
  			return nil, newErrPreconditionFailed(patchMap)
  		}
  	}
  
  	return json.Marshal(patchMap)
  }
docs: // CreateTwoWayMergePatch creates a patch that can be passed to StrategicMergePatch from an original
  // document and a modified document, which are passed to the method as json encoded content. It will
  // return a patch that yields the modified document when applied to the original document, or an error
  // if either of the two documents is invalid.