Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
bitbucket.org/heapsapp/envflag
Package envflag
is a Go package that
exposes environment variables for all the flags within
a flag.FlagSet
.
It came out of a response to a Reddit post by jalquiza about their envy package.
This package differs from that one in several ways:
the usage is slightly different, it is not a drop in replacement
it can be used with any flag.FlagSet
, not just flag.CommandLine
it tries harder (compared to the original envy
) to avoid effecting
the reported argument defaults or the results of functions/methods such as
flag.Visit
and flag.NFlag
if there are any errors parsing environment variables (e.g. a string value where an interger value is expected) the first such encountered is returned
See the GoDoc documentation for complete examples but basically you can just replace the call to:
flag.Parse()
with:
envflag.Parse("PROGNAME", true)
to have envirment variables such as PROGNAME_PORT
be used for
the program's -port
argument when no such argument is provided.
This package is Copyright 2017, Dave Chapeskie.
You are free to do with it anything you want, with the sole exception being you cannot replicate this package and claim you wrote it.
FAQs
Unknown package
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.