1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-14 17:52:28 +08:00

feat: os.go, add GetOsBits

This commit is contained in:
dudaodong
2022-07-27 15:27:39 +08:00
parent 33e3631b72
commit 387079d034
2 changed files with 16 additions and 0 deletions

View File

@@ -70,3 +70,9 @@ func ExecCommand(command string) (stdout, stderr string, err error) {
return
}
// GetOsBits get this system bits 32bit or 64bit
// return bit int (32/64)
func GetOsBits() int {
return 32 << (^uint(0) >> 63)
}