Skip to content

Commit 26f450a

Browse files
committed
Lint and code analysis fixes
Signed-off-by: Yossi Mesika <[email protected]>
1 parent 1a8f220 commit 26f450a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ require (
289289
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
290290
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
291291
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
292-
github.com/golang/protobuf v1.5.4 // indirect
292+
github.com/golang/protobuf v1.5.4
293293
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
294294
github.com/golangci/go-printf-func-name v0.1.0 // indirect
295295
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect

hack/utils/oss_compliance/osa_provided.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Name|Version|License
1313
[ghodss/yaml](https://github.com/ghodss/yaml)|v1.0.1-0.20190212211648-25d852aebe32|MIT License
1414
[go-logr/logr](https://github.com/go-logr/logr)|v1.4.2|Apache License 2.0
1515
[go-logr/zapr](https://github.com/go-logr/zapr)|v1.3.0|Apache License 2.0
16+
[golang/protobuf](https://github.com/golang/protobuf)|v1.5.4|BSD 3-clause "New" or "Revised" License
1617
[google/go-cmp](https://github.com/google/go-cmp)|v0.7.0|BSD 3-clause "New" or "Revised" License
1718
[grpc-ecosystem/go-grpc-middleware](https://github.com/grpc-ecosystem/go-grpc-middleware)|v1.4.0|Apache License 2.0
1819
[kelseyhightower/envconfig](https://github.com/kelseyhightower/envconfig)|v1.4.0|MIT License

internal/kgateway/extensions2/plugins/trafficpolicy/traffic_policy_plugin.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ func (p *trafficPolicyPluginGwPass) ApplyVhostPlugin(ctx context.Context, pCtx *
594594

595595
// Add cors policy to the virtual host if policy has it at the gateway level
596596
if policy.spec.cors != nil {
597-
corsAny, err := anypb.New(policy.spec.cors.corsConfig)
597+
corsAny, err := utils.MessageToAny(policy.spec.cors.corsConfig)
598598
if err != nil {
599+
logger.Error("failed to create Any for CORS config", "error", err.Error())
599600
return
600601
}
601602
if out.GetTypedPerFilterConfig() == nil {

0 commit comments

Comments
 (0)