Comments (4)
Okay, as a hack to make it work, I added this to my global vars:
var chatty = flag.Bool("test.v", false, "verbose: print additional output")
Taken from here: https://golang.org/src/testing/testing.go#L232
Now using only your package, this particular flag seems to work. Of course this isn't ideal as the others are still broken, but I guess I'll keep adding them to my project as needed until we get a fix here. E.g., go test -trace my.trace
isn't working.
from flag.
I see this issue describing the same thing: #9
Here are steps to reproduce:
- Download this gist into its own directory: https://gist.github.com/wyc/b6d7dae829e613e5260e4310061161de
- Run
go test -v
The result should be something like this:
$ go test -v
flag provided but not defined: -test.v
Usage of /tmp/go-build338776245/_/tmp/repro/_test/repro.test:
exit status 2
FAIL _/tmp/repro 0.001s
from flag.
Thanks for taking the time to describe the problem and write a test.
Please test d922432 in the testflag
branch for a fix.
from flag.
Hey, thanks for the swift response on this! I really appreciate it. Your solution works perfectly for me.
Added a test here in case you wanted one:
#11
Consider it solved!
from flag.
Related Issues (20)
- not a drop-in replacement HOT 12
- using config file by default HOT 6
- Execution with -h should just print the usage instruction and exit HOT 2
- print error from config file parsing by default HOT 1
- Parse behaviour is wrong when flag contains "-" HOT 1
- lowercase environment variables HOT 1
- prefix for environment variables HOT 6
- Add camel case flag name example to readme
- type alias for Value, Getter etc.
- Is there a way to disable the ConfigFlagname of a FlagSet?
- Release new version
- Odd interaction with other libraries using flag behind the scenes HOT 3
- Support for fixed-size integer types
- Reading individual values from files (eg. docker secrets) HOT 3
- Support for required flag and Default should be optional
- Out of Sync with latest go version - Newer fork available jnovack/flag HOT 2
- Config file parse failure "configuration variable provided but not defined" is not visible to application HOT 2
- Required environment variables is a regression HOT 6
- Running go test with any of the standard flags throws an "flag provided but not defined:" error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flag.