Skip to content

Commit

Permalink
Revert DeepCopy to use un/marshal (istio#327)
Browse files Browse the repository at this point in the history
* Revert DeepCopy to use un/marshal

* Lint
  • Loading branch information
ostromart authored and istio-testing committed Oct 8, 2019
1 parent ac62f7e commit e716392
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pkg/apis/istio/v1alpha2/deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,21 @@ import (
"github.com/gogo/protobuf/proto"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"istio.io/operator/pkg/util"
"istio.io/pkg/log"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IstioControlPlane) DeepCopyInto(out *IstioControlPlane) {
*out = *proto.Clone(in).(*IstioControlPlane)
func (in *IstioControlPlane) DeepCopyInto(out proto.Message) {
inj, err := util.MarshalWithJSONPB(in)
if err != nil {
log.Error(err.Error())
return
}
if err := util.UnmarshalWithJSONPB(inj, out); err != nil {
log.Error(err.Error())
}
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioControlPlane.
Expand Down

0 comments on commit e716392

Please sign in to comment.