This repository was archived by the owner on Oct 31, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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
2627func (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
4146func (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
You can’t perform that action at this time.
0 commit comments