func IsConflict(err error) bool {
	_, ok := err.(errConflict)
	return ok
}
IsConflict returns true if the provided error indicates
a conflict between the patch and the current configuration.
package strategicpatch
import (
	"encoding/json"
	"fmt"
	"reflect"
	"sort"
	forkedjson "k8s.io/kubernetes/third_party/forked/json"
	"github.com/davecgh/go-spew/spew"
	"github.com/ghodss/yaml"
)
const (
	directiveMarker  = "$patch"
	deleteDirective  = "delete"
	replaceDirective = "replace"
	mergeDirective   = "merge"
)
func IsPreconditionFailed(err error) bool {
	_, ok := err.(errPreconditionFailed)
	return ok
}
type errPreconditionFailed struct {
	message string
}
func newErrPreconditionFailed(target map[string]interface{}) errPreconditionFailed {
	s := fmt.Sprintf("precondition failed for: %v", target)
	return errPreconditionFailed{s}
}
func (err errPreconditionFailed) Error() string {
	return err.message
}
type errConflict struct {
	message string
}
func newErrConflict(patch, current string) errConflict {
	s := fmt.Sprintf("patch:\n%s\nconflicts with changes made from original to current:\n%s\n", patch, current)
	return errConflict{s}
}
func (err errConflict) Error() string {
	return err.message
}