From 6b16247685dfbdae60f9c57e940a81899f87b287 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 19 Nov 2015 14:55:57 +0100 Subject: [PATCH] Follow-up of 17478, unexport private method Signed-off-by: Vincent Demeester --- platform/architecture_freebsd.go | 4 ++-- platform/architecture_linux.go | 4 ++-- platform/architecture_windows.go | 4 ++-- platform/platform.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/architecture_freebsd.go b/platform/architecture_freebsd.go index e8bf398..06dc9fe 100644 --- a/platform/architecture_freebsd.go +++ b/platform/architecture_freebsd.go @@ -4,8 +4,8 @@ import ( "os/exec" ) -// GetRuntimeArchitecture get the name of the current architecture (x86, x86_64, …) -func GetRuntimeArchitecture() (string, error) { +// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +func runtimeArchitecture() (string, error) { cmd := exec.Command("uname", "-m") machine, err := cmd.Output() if err != nil { diff --git a/platform/architecture_linux.go b/platform/architecture_linux.go index e732534..ef7c047 100644 --- a/platform/architecture_linux.go +++ b/platform/architecture_linux.go @@ -6,8 +6,8 @@ import ( "syscall" ) -// GetRuntimeArchitecture get the name of the current architecture (x86, x86_64, …) -func GetRuntimeArchitecture() (string, error) { +// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +func runtimeArchitecture() (string, error) { utsname := &syscall.Utsname{} if err := syscall.Uname(utsname); err != nil { return "", err diff --git a/platform/architecture_windows.go b/platform/architecture_windows.go index 19717c9..c72e166 100644 --- a/platform/architecture_windows.go +++ b/platform/architecture_windows.go @@ -36,8 +36,8 @@ const ( var sysinfo systeminfo -// GetRuntimeArchitecture get the name of the current architecture (x86, x86_64, …) -func GetRuntimeArchitecture() (string, error) { +// runtimeArchitecture get the name of the current architecture (x86, x86_64, …) +func runtimeArchitecture() (string, error) { syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0) switch sysinfo.wProcessorArchitecture { case ProcessorArchitecture64, ProcessorArchitectureIA64: diff --git a/platform/platform.go b/platform/platform.go index d84c4f5..59e2529 100644 --- a/platform/platform.go +++ b/platform/platform.go @@ -15,7 +15,7 @@ var ( func init() { var err error - Architecture, err = GetRuntimeArchitecture() + Architecture, err = runtimeArchitecture() if err != nil { logrus.Errorf("Could no read system architecture info: %v", err) }