func MergeFrom(obj runtime.Object) Patch {
	return &mergeFromPatch{obj}
}
MergeFrom creates a Patch that patches using the merge-patch strategy with the given object as base.
package client
import (
	jsonpatch "github.com/evanphx/json-patch"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/apimachinery/pkg/util/json"
)
var (
	Apply = applyPatch{}
	Merge = mergePatch{}
)
type patch struct {
	patchType types.PatchType
	data      []byte
}
func (s *patch) Type() types.PatchType {
	return s.patchType
}
func (s *patch) Data(obj runtime.Object) ([]byte, error) {
	return s.data, nil
}
func RawPatch(patchType types.PatchType, data []byte) Patch {
	return &patch{patchType, data}
}
func ConstantPatch(patchType types.PatchType, data []byte) Patch {
	return RawPatch(patchType, data)
}
type mergeFromPatch struct {
	from runtime.Object
}
func (s *mergeFromPatch) Type() types.PatchType {
	return types.MergePatchType
}
func (s *mergeFromPatch) Data(obj runtime.Object) ([]byte, error) {
	originalJSON, err := json.Marshal(s.from)
	if err != nil {
		return nil, err
	}
	modifiedJSON, err := json.Marshal(obj)
	if err != nil {
		return nil, err
	}
	return jsonpatch.CreateMergePatch(originalJSON, modifiedJSON)
}