Skip to content

Commit

Permalink
Move from github.com/golang/protobuf to google.golang.org/protobuf
Browse files Browse the repository at this point in the history
Signed-off-by: beorn7 <beorn@grafana.com>
  • Loading branch information
beorn7 committed May 25, 2023
1 parent 43fe5fe commit 08a7a44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/prometheus/common v0.44.0
github.com/prometheus/exporter-toolkit v0.10.0
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
google.golang.org/protobuf v1.30.0
)

require (
Expand All @@ -33,7 +34,6 @@ require (
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

Expand Down
6 changes: 3 additions & 3 deletions handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"time"

"github.com/go-kit/log"
//nolint:staticcheck // Ignore SA1019. Dependencies use the deprecated package, so we have to, too.
"github.com/golang/protobuf/proto"
"github.com/matttproud/golang_protobuf_extensions/pbutil"
"github.com/prometheus/common/route"
"google.golang.org/protobuf/encoding/prototext"
"google.golang.org/protobuf/proto"

dto "github.com/prometheus/client_model/go"

Expand Down Expand Up @@ -613,7 +613,7 @@ func verifyMetricFamily(t *testing.T, expText string, got *dto.MetricFamily) {
}

exp := &dto.MetricFamily{}
err = proto.UnmarshalText(expText, exp)
err = prototext.Unmarshal([]byte(expText), exp)
if err != nil {
t.Errorf("unexpected error unmarshaling MetricFamily text %v", expText)
}
Expand Down

0 comments on commit 08a7a44

Please sign in to comment.