From 0275b007c6a0d21e33d52af376d7f7d99f8f17b9 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Wed, 26 Jun 2019 16:50:56 +0100 Subject: [PATCH] vet: Fix composite literal uses unkeyed fields warnings Signed-off-by: Euan Harris --- libnetwork/drivers/overlay/ostweaks_linux.go | 6 +++--- libnetwork/osl/namespace_linux.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libnetwork/drivers/overlay/ostweaks_linux.go b/libnetwork/drivers/overlay/ostweaks_linux.go index de946a5846..fa0a470921 100644 --- a/libnetwork/drivers/overlay/ostweaks_linux.go +++ b/libnetwork/drivers/overlay/ostweaks_linux.go @@ -7,9 +7,9 @@ import ( ) var ovConfig = map[string]*kernel.OSValue{ - "net.ipv4.neigh.default.gc_thresh1": {"8192", checkHigher}, - "net.ipv4.neigh.default.gc_thresh2": {"49152", checkHigher}, - "net.ipv4.neigh.default.gc_thresh3": {"65536", checkHigher}, + "net.ipv4.neigh.default.gc_thresh1": {Value: "8192", CheckFn: checkHigher}, + "net.ipv4.neigh.default.gc_thresh2": {Value: "49152", CheckFn: checkHigher}, + "net.ipv4.neigh.default.gc_thresh3": {Value: "65536", CheckFn: checkHigher}, } func checkHigher(val1, val2 string) bool { diff --git a/libnetwork/osl/namespace_linux.go b/libnetwork/osl/namespace_linux.go index 3879b03444..ed44311418 100644 --- a/libnetwork/osl/namespace_linux.go +++ b/libnetwork/osl/namespace_linux.go @@ -40,7 +40,7 @@ var ( loadBalancerConfig = map[string]*kernel.OSValue{ // expires connection from the IPVS connection table when the backend is not available // more info: https://github.com/torvalds/linux/blob/master/Documentation/networking/ipvs-sysctl.txt#L126:1 - "net.ipv4.vs.expire_nodest_conn": {"1", nil}, + "net.ipv4.vs.expire_nodest_conn": {Value: "1", CheckFn: nil}, } )