企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
TOC] ## 语法 ``` type User struct { Uid string Gid string Username string Name string HomeDir string } type Group struct { Gid string // group ID Name string // group name } ``` ## 实例 ### Current ``` current, _ := user.Current() fmt.Printf("%+v\n", current) // &{Uid:0 Gid:0 Username:root Name:root HomeDir:/root} ``` ### Lookup ``` lookup, _ := user.Lookup("root") fmt.Println(lookup) ``` ### LookupId ### LookupGroup ### LookupGroupId