Socket
Book a DemoInstallSign in
Socket

gopkg.in/nowk/nflag.v1

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gopkg.in/nowk/nflag.v1

v1.0.0
Go
Version published
Created
Source

nflag

Utility around the flag package to set the default value from an ENV variable, which can be overridden by setting the flag.

Install

go get gopkg.in/nowk/nflag.v1

Example

var port String
nflag.StringVar(&port, "PORT", "bind-address", ":3000", "default server address")

Use default

main

Use ENV

PORT=:4000 main

Override with flag

main --bind-address=:5000

License

MIT

FAQs

Package last updated on 24 Dec 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.