go-platform

2019-08-15 admin

go-platform是什么

什么是go-platform,print out golang platform variables

go-platform使用教程帮助文档

node-go-platform

Figures out the host machine’s platform for Go purposes.

npm install go-platform

cli

It includes a cli tool that prints out $GOOS-$GOARCH:

> npm install go-platform
> node_modules/.bin/go-platform
darwin-amd64

> node_modules/.bin/go-platform --env
GOOS=darwin
GOARCH=amd64

> node_modules/.bin/go-platform --obj
{"GOOS": "darwin", "GOARCH": "amd64"}

> node_modules/.bin/go-platform --obj --pretty
{
  "GOOS": "darwin",
  "GOARCH": "amd64"
}

lib

> var goplatform = require('go-platform')
> console.log(goplatform)
{ GOOS: 'darwin', GOARCH: 'amd64'}

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72581.html

文章标题:go-platform

回到顶部