Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Readme
Run Go commands from Node or CLI, Go env not required
Will download latest binaries locally if Go isn't already in PATH
If you run a command and it fails with "cannot find package..." we'll try to install said package(s). YAYS. :relieved:
$ npm install --save ngo
$ npm install --global ngo
$ ngo version
# go version go1.8.3 windows/amd64
# to update the `ngo` install of Go (won't update system version)
$ ngo-update
# go version go1.9.4 windows/amd64
# to set the `ngo` install of Go to a specific version (won't update system version)
$ ngo-version 1.12.0
# go version go1.12.0 windows/amd64
# to run a `go get` installed binary use this bs
$ ngo-binary golint test/fixtures/errors.go
# test\fixtures\errors.go:13:5: error var unexp should have name of the form errFoo
returns promise that resolves to execa
style object without the child_process
goodies
const goOpts = {}
const ngo = require('ngo')(goOpts)
const golint = ngo.bin('golint')
ngo('version').then(console.log).catch(console.error)
/* {
stdout: 'go version go1.8.3 windows/amd64',
stderr: '',
code: 0,
failed: false,
killed: false,
signal: null,
cmd: 'C:\\Go\\bin\\go version'
} */
golint('main.go').then(console.log).catch(console.error)
options
)ngo
Object
- optional]
Boolean
false
] - use locally downloaded Go binaries)Boolean
false
] - update local install to latestBoolean
true
] - attempt to install missing packagesObject
] - environment vars to set for the Go commandString
] - Go root path (ex. /usr/local/go
)String
] - Go workspace path (ex. ~/work
)Function
(ngo
) which executes Go commandscommandArgs
, options
)go
commandsArray
| String
- required] - argument(s) to call with go
commandObject
- optional]child_process.spawn
execa
Promise
which resolves to execa
styled objectbinary
)GOBIN
directoryString
] - name of binary file to be executed in returned functionFunction
(identical to ngo
, but runs specified binary instead of go
)this is a copy of ngo's process.env
with the Go environment variables added to it
MIT © Andrew Carpenter
FAQs
Run Go commands from Node or CLI, Go env not required
We found that ngo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).