浏览代码

Follow-up of 17478, unexport private method

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Vincent Demeester 9 年之前
父节点
当前提交
0ff3c10aa8

+ 2 - 2
pkg/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 {

+ 2 - 2
pkg/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

+ 2 - 2
pkg/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:

+ 1 - 1
pkg/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)
 	}