Skip to content

Commit 16ffc00

Browse files
ivanmatmatioktalz
authored andcommitted
MINOR: settings for deep comparison to consider nil and empty as the same.
Some comparison between nil and empty fields can lead to unnecessary reload because they're considered as different.
1 parent b27274b commit 16ffc00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929

3030
"k8s.io/apimachinery/pkg/watch"
3131

32+
"github.com/go-test/deep"
3233
"github.com/jessevdk/go-flags"
3334

3435
"github.com/haproxytech/kubernetes-ingress/pkg/annotations"
@@ -81,6 +82,9 @@ func main() {
8182
osArgs.ControllerPort = 6060
8283
}
8384

85+
deep.NilMapsAreEmpty = true
86+
deep.NilSlicesAreEmpty = true
87+
8488
// Default annotations
8589
defaultBackendSvc := fmt.Sprint(osArgs.DefaultBackendService)
8690
defaultCertificate := fmt.Sprint(osArgs.DefaultCertificate)

0 commit comments

Comments
 (0)