Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
  • Loading branch information
zhaohuabing committed Jul 30, 2023
1 parent ff2ed68 commit a53ad6f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/envoyfilter/network_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
package envoyfilter

import (
"bytes"
"fmt"
"strconv"
"strings"

_struct "github.com/golang/protobuf/ptypes/struct"

"github.com/envoyproxy/go-control-plane/pkg/wellknown"
gogojsonpb "github.com/gogo/protobuf/jsonpb"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
networking "istio.io/api/networking/v1alpha3"
Expand Down Expand Up @@ -205,7 +203,7 @@ func generateValue(proxy proto.Message, filterName, filterType string) (*_struct
}

var value = &_struct.Struct{}
if err := (&gogojsonpb.Unmarshaler{AllowUnknownFields: false}).Unmarshal(bytes.NewBuffer(buf), value); err != nil {
if err := protojson.Unmarshal(buf, value); err != nil {
return nil, err
}

Expand Down

0 comments on commit a53ad6f

Please sign in to comment.