diff --git a/go.mod b/go.mod index 874fd8bb8..f8b8da42e 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/google/uuid v1.6.0 - github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 @@ -78,6 +77,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect diff --git a/pkg/apiserver/schema/cel/compilation.go b/pkg/apiserver/schema/cel/compilation.go index ff931c5f5..1f61a87fa 100644 --- a/pkg/apiserver/schema/cel/compilation.go +++ b/pkg/apiserver/schema/cel/compilation.go @@ -17,6 +17,7 @@ limitations under the License. package cel import ( + "errors" "fmt" "strings" "time" @@ -24,7 +25,6 @@ import ( "github.com/google/cel-go/cel" "github.com/google/cel-go/checker" "github.com/google/cel-go/common/types" - "github.com/pkg/errors" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/apiserver/schema" @@ -127,7 +127,7 @@ func Compile(s *schema.Structural, declType *apiservercel.DeclType, perCallLimit return nil, nil } if declType == nil { - return nil, errors.New("Failed to convert to declType for CEL validation rules") + return nil, errors.New("failed to convert to declType for CEL validation rules") } celRules := s.XValidations