From 954cddbafcf57c492b45baf17f3a3be43b0cc74f Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Mon, 23 Dec 2024 21:20:19 +0000 Subject: [PATCH] fix(cli): migrate deprecated protobug --- cli/go.mod | 2 +- cli/scorecard/score.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/go.mod b/cli/go.mod index a19e07f73db..a780da5bcaa 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -13,7 +13,7 @@ require ( github.com/fatih/color v1.18.0 github.com/gammazero/workerpool v1.1.3 github.com/go-git/go-git/v5 v5.12.0 - github.com/golang/protobuf v1.5.4 + github.com/golang/protobuf v1.5.4 // indirect github.com/gomarkdown/markdown v0.0.0-20241205020045-f7e15b2f3e62 github.com/google/go-cmp v0.6.0 github.com/google/go-github/v67 v67.0.0 diff --git a/cli/scorecard/score.go b/cli/scorecard/score.go index 9a50b0b350e..afcf1131193 100644 --- a/cli/scorecard/score.go +++ b/cli/scorecard/score.go @@ -28,8 +28,8 @@ import ( "github.com/GoogleCloudPlatform/config-validator/pkg/api/validator" "github.com/GoogleCloudPlatform/config-validator/pkg/gcv" - _struct "github.com/golang/protobuf/ptypes/struct" "github.com/pkg/errors" + "google.golang.org/protobuf/types/known/structpb" ) // ScoringConfig holds settings for generating a score @@ -104,7 +104,7 @@ type RichViolation struct { Category string // category of violation Resource string Message string - Metadata *_struct.Value `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *structpb.Value `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` asset *validator.Asset `json:"-"` }