From eb94bd73854e950fe8a1af2335132ee913f4f252 Mon Sep 17 00:00:00 2001 From: Christy Perez Date: Fri, 26 Feb 2016 12:47:43 -0600 Subject: [PATCH] Match case for variables in sysinfo pkg I noticied an inconsistency when reviewing docker/pull/20692. Changing Ip to IP and Nf to NF. More info: The golang folks recommend that you keep the initials consistent: https://github.com/golang/go/wiki/CodeReviewComments#initialisms. Signed-off-by: Christy Perez --- sysinfo/sysinfo.go | 4 ++-- sysinfo/sysinfo_linux.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysinfo/sysinfo.go b/sysinfo/sysinfo.go index 285b3ba..3adaa94 100644 --- a/sysinfo/sysinfo.go +++ b/sysinfo/sysinfo.go @@ -19,10 +19,10 @@ type SysInfo struct { IPv4ForwardingDisabled bool // Whether bridge-nf-call-iptables is supported or not - BridgeNfCallIptablesDisabled bool + BridgeNFCallIPTablesDisabled bool // Whether bridge-nf-call-ip6tables is supported or not - BridgeNfCallIP6tablesDisabled bool + BridgeNFCallIP6TablesDisabled bool // Whether the cgroup has the mountpoint of "devices" or not CgroupDevicesEnabled bool diff --git a/sysinfo/sysinfo_linux.go b/sysinfo/sysinfo_linux.go index 766d13d..7f584bb 100644 --- a/sysinfo/sysinfo_linux.go +++ b/sysinfo/sysinfo_linux.go @@ -50,8 +50,8 @@ func New(quiet bool) *SysInfo { sysInfo.CgroupDevicesEnabled = ok sysInfo.IPv4ForwardingDisabled = !readProcBool("/proc/sys/net/ipv4/ip_forward") - sysInfo.BridgeNfCallIptablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables") - sysInfo.BridgeNfCallIP6tablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables") + sysInfo.BridgeNFCallIPTablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-iptables") + sysInfo.BridgeNFCallIP6TablesDisabled = !readProcBool("/proc/sys/net/bridge/bridge-nf-call-ip6tables") // Check if AppArmor is supported. if _, err := os.Stat("/sys/kernel/security/apparmor"); !os.IsNotExist(err) {