mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-10 07:42:27 +08:00
System: Add the system bits judgment (#44)
Co-authored-by: anyanfei <anyanfei@yungengxin.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user