From 5931b882eecb40ea00c6e9cbdc9b2256826cb64f Mon Sep 17 00:00:00 2001 From: dudaodong Date: Fri, 29 Jul 2022 13:33:23 +0800 Subject: [PATCH] doc: update document for system package --- docs/system.md | 23 ++++++++++++++++++++++- docs/system_zh-CN.md | 23 ++++++++++++++++++++++- 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/docs/system.md b/docs/system.md index e08bc0d..bf7edcb 100644 --- a/docs/system.md +++ b/docs/system.md @@ -28,6 +28,7 @@ import ( - [RemoveOsEnv](#RemoveOsEnv) - [CompareOsEnv](#CompareOsEnv) - [ExecCommand](#ExecCommand) +- [GetOsBits](#GetOsBits)
@@ -235,7 +236,27 @@ func main() { - +### GetOsBits +

获取当前操作系统位数,返回32或64

+ +函数签名: + +```go +func GetOsBits() int +``` +例子: + +```go +import ( + "fmt" + "github.com/duke-git/lancet/system" +) + +func main() { + osBit := system.GetOsBits() + fmt.Println(osBit) +} +``` diff --git a/docs/system_zh-CN.md b/docs/system_zh-CN.md index 7193e3e..f0acb3a 100644 --- a/docs/system_zh-CN.md +++ b/docs/system_zh-CN.md @@ -28,6 +28,7 @@ import ( - [RemoveOsEnv](#RemoveOsEnv) - [CompareOsEnv](#CompareOsEnv) - [ExecCommand](#ExecCommand) +- [GetOsBits](#GetOsBits)
@@ -235,7 +236,27 @@ func main() { - +### GetOsBits +

Get current os bits, 32bit or 64bit. return 32 or 64

+ +Signature: + +```go +func GetOsBits() int +``` +Example: + +```go +import ( + "fmt" + "github.com/duke-git/lancet/system" +) + +func main() { + osBit := system.GetOsBits() + fmt.Println(osBit) +} +```