Skip to content

Commit

Permalink
fix issue #1388
Browse files Browse the repository at this point in the history
  • Loading branch information
zzr93 committed Mar 16, 2023
1 parent 6879038 commit d265e0d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/apis/apisix/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package v2

import (
"encoding/json"

"bytes"
"encoding/gob"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
Expand Down Expand Up @@ -188,8 +188,11 @@ type ApisixRouteAuthenticationJwtAuth struct {
}

func (p ApisixRoutePluginConfig) DeepCopyInto(out *ApisixRoutePluginConfig) {
b, _ := json.Marshal(&p)
_ = json.Unmarshal(b, out)
var buf bytes.Buffer
enc := gob.NewEncoder(&buf)
dec := gob.NewDecoder(&buf)
_ = enc.Encode(p)
_ = dec.Decode(out)
}

func (p *ApisixRoutePluginConfig) DeepCopy() *ApisixRoutePluginConfig {
Expand Down

0 comments on commit d265e0d

Please sign in to comment.