Signed-off-by: allencloud <allen.sun@daocloud.io>
| ... | ... |
@@ -1,5 +1,7 @@ |
| 1 |
-// +build freebsd solaris |
|
| 1 |
+// +build freebsd solaris darwin |
|
| 2 | 2 |
|
| 3 |
+// Package platform provides helper function to get the runtime architecture |
|
| 4 |
+// for different platforms. |
|
| 3 | 5 |
package platform |
| 4 | 6 |
|
| 5 | 7 |
import ( |
| ... | ... |
@@ -7,7 +9,7 @@ import ( |
| 7 | 7 |
"strings" |
| 8 | 8 |
) |
| 9 | 9 |
|
| 10 |
-// runtimeArchitecture get the name of the current architecture (i86pc, sun4v) |
|
| 10 |
+// runtimeArchitecture gets the name of the current architecture (x86, x86_64, i86pc, sun4v, ...) |
|
| 11 | 11 |
func runtimeArchitecture() (string, error) {
|
| 12 | 12 |
cmd := exec.Command("/usr/bin/uname", "-m")
|
| 13 | 13 |
machine, err := cmd.Output() |