Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit da20e5c

Browse files
committedMay 1, 2024··
Code cleanup/lint fixes
1 parent 0a62e04 commit da20e5c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed
 

‎go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ require (
1616
github.com/iancoleman/strcase v0.3.0
1717
github.com/martinlindhe/base36 v1.1.1
1818
github.com/open-policy-agent/opa v0.64.1
19+
github.com/pomerium/csrf v1.7.0
1920
github.com/pomerium/pomerium v0.25.1-0.20240501190122-e30d90206df9
2021
github.com/rs/zerolog v1.32.0
2122
github.com/sergi/go-diff v1.3.1
@@ -154,7 +155,6 @@ require (
154155
github.com/philhofer/fwd v1.0.0 // indirect
155156
github.com/pkg/errors v0.9.1 // indirect
156157
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
157-
github.com/pomerium/csrf v1.7.0 // indirect
158158
github.com/pomerium/datasource v0.18.2-0.20221108160055-c6134b5ed524 // indirect
159159
github.com/pomerium/webauthn v0.0.0-20221118023040-00a9c430578b // indirect
160160
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect

‎pomerium/ingress_to_route.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ func ruleToRoute(rule networkingv1.IngressRule, tmpl *pb.Route, ic *model.Ingres
9595
if ic.IsAnnotationSet(model.SubtleAllowEmptyHost) {
9696
rule.Host = "*"
9797
} else {
98-
return nil, fmt.Errorf("ingress rule has empty host; if this is intentional, set the annotation '%s/%s=true'", ic.AnnotationPrefix, model.SubtleAllowEmptyHost)
98+
return nil, fmt.Errorf("ingress rule has empty host; if this is intentional, set the annotation '%s/%s=true'",
99+
ic.AnnotationPrefix, model.SubtleAllowEmptyHost)
99100
}
100101
}
101102

‎pomerium/routes_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1377,5 +1377,6 @@ func TestEmptyHostRoute(t *testing.T) {
13771377

13781378
clear(ic.Annotations)
13791379

1380-
require.Error(t, upsertRoutes(context.Background(), &config, ic))
1380+
require.ErrorContains(t, upsertRoutes(context.Background(), &config, ic),
1381+
"ingress rule has empty host")
13811382
}

0 commit comments

Comments
 (0)