Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit efaf03f

Browse files
committed
uname-it: found the link to find add the blanks
1 parent 5c80245 commit efaf03f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

platform.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,47 @@ func (p *Platform) String() string {
2323
}
2424

2525
/// Like `uname -s`
26+
// Matches https://github.com/golang/go/blob/master/src/go/build/syslist.go
2627
func (p *Platform) OSUname() string {
2728
return map[string]string{
29+
//"android":
2830
"darwin": "Darwin",
2931
"dragonfly": "DragonFly",
3032
"freebsd": "FreeBSD",
3133
"linux": "Linux",
34+
//"nacl":
3235
"netbsd": "NetBSD",
3336
"openbsd": "OpenBSD",
3437
"plan9": "Plan9",
3538
"solaris": "SunOS",
3639
"windows": "Windows",
40+
//"zos":
3741
}[p.OS]
3842
}
3943

4044
/// Like `uname -m`
45+
// Matches https://github.com/golang/go/blob/master/src/go/build/syslist.go
4146
func (p *Platform) ArchUname() string {
4247
return map[string]string{
4348
"386": "i386",
4449
"amd64": "x86_64",
50+
//"amd64p32":
4551
"arm": "arm",
52+
//"armbe":
4653
"arm64": "aarch64",
54+
//"arm64be":
4755
"ppc64": "ppc64",
4856
"ppc64le": "ppc64le",
57+
//"mips":
58+
//"mipsle":
59+
//"mips64":
60+
//"mips64p32":
61+
//"mips64p32le":
62+
//"ppc":
63+
//"s390":
64+
//"s390x":
65+
//"sparc":
66+
//"sparc64":
4967
}[p.Arch]
5068
}
5169

0 commit comments

Comments
 (0)