go-platform

print out golang platform variables

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'}

HomePage

https://github.com/jbenet/node-go-platform

Repository

https://github.com/jbenet/node-go-platform


上一篇:ipfs-http-client
下一篇:56 道高频 JavaScript 与 ES6+ 的面试题及答案

相关推荐

  • 可能的值为navigator.platform列表作为今天是什么?

    Stijnthomasstephn(https://stackoverflow.com/users/247702/stijn)提出了一个问题:What is the list of possible ...

    2 年前
  • pretend-platform

    Pretend the current process is running on a given platform pretendplatform npm version(https://im...

    1 年前
  • platformenv

    This is a microlibrary with a single function , that sets a number of predicates on the global objec...

    6 个月前
  • platform-utils

    Helper functions for working with platform names in the Node.js vernacular (darwin|win32|linux). Wor...

    1 年前
  • platform-ng

    A quickconfiguring ExpressJS webapp platform platformng =========== Rapid, sane configuration of E...

    4 个月前
  • platform

    A platform detection library that works on nearly all JavaScript platforms. Platform.js v1.3.5 A ...

    2 年前
  • path-platform

    Provide access to win32 and posix path operations; sourced directly from upstream Node.js pathplat...

    1 年前
  • linux-platform-info

    Returns platorm information (arch, libc) for Linux hosts linuxplatforminfo CDN by jsDel...

    1 年前
  • db-platforms

    Deutsche Bahn platform information, enriched with OSM data. dbplatforms Deutsche Bahn platform in...

    6 天前
  • browser-process-platform

    Browser shim for Node.js process.platform browserprocessplatform Browser shim for Node.js . See...

    8 个月前

官方社区

扫码加入 JavaScript 社区