Revert "remove github.com/golang/protobuf/proto"

This reverts commit 1516e0249f.
This commit is contained in:
chrislu
2024-03-17 01:00:43 -07:00
parent a8b73296d7
commit 4dce1e9d29
3 changed files with 7 additions and 5 deletions

View File

@@ -5,9 +5,8 @@ import (
"github.com/seaweedfs/seaweedfs/weed/storage/erasure_coding"
"github.com/seaweedfs/seaweedfs/weed/storage/types"
"github.com/stretchr/testify/assert"
// "google.golang.org/protobuf/proto"
//"github.com/golang/protobuf/proto"
jsonpb "google.golang.org/protobuf/encoding/protojson"
//"google.golang.org/protobuf/proto"
"github.com/golang/protobuf/proto"
"strconv"
"strings"
"testing"
@@ -92,7 +91,7 @@ func parseOutput(output string) *master_pb.TopologyInfo {
case "volume":
volumeLine := line[len("volume "):]
volume := &master_pb.VolumeInformationMessage{}
jsonpb.Unmarshal([]byte(volumeLine), volume)
proto.UnmarshalText(volumeLine, volume)
disk.VolumeInfos = append(disk.VolumeInfos, volume)
case "ec":
ecVolumeLine := line[len("ec volume "):]