Skip to content
Node: process.archgithub.com/sahilkhaire/gox/osutil

Arch

Overview ​

Arch returns the architecture (runtime.GOARCH).

If you are coming from Node.js, the closest pattern is process.arch.

Signature ​

go
func Arch() string

Compare: Node.js · Standard Go · gox ​

js
process.arch
go
val, err := os.Arch()
go
import "github.com/sahilkhaire/gox/osutil"

osutil.Arch()

Example ​

go
import "github.com/sahilkhaire/gox/osutil"

osutil.Arch()

Tips ​

Import github.com/sahilkhaire/gox/osutil and call Arch directly. See the comparison below for the standard library equivalent.

Standard library alternative ​

Use the standard library directly:

go
val, err := os.Arch()

← Back to osutil package overview

MIT Licensed · Built for Node.js developers moving to Go