Node: osgithub.com/sahilkhaire/gox/osutil
UserInfoNumeric
Overview
UserInfoNumeric is like UserInfo but parses uid/gid as ints when possible.
Part of the osutil package — Node.js analog: os.
Signature
go
func UserInfoNumeric() (username string, uid, gid int, err error)Compare: Node.js · Standard Go · gox
js
// Typical os pattern in Node.jsgo
// Use the underlying stdlib or driver directly.
// See package overview for escape hatches.go
import "github.com/sahilkhaire/gox/osutil"
result, err := osutil.UserInfoNumeric()
if err != nil {
return err
}Example
go
import "github.com/sahilkhaire/gox/osutil"
result, err := osutil.UserInfoNumeric()
if err != nil {
return err
}Tips
Import github.com/sahilkhaire/gox/osutil and call UserInfoNumeric directly. See the comparison below for the standard library equivalent.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.