Comments (5)
The reason we don't do this is because we use the interface across RPC in a couple of our projects and it didn't deal well with variadics... At this point it would actually break backwards compatibility too (as a lib).
We also follow the pattern of using fmt.Sprintf
everywhere. Is it worth breaking compat over? I'm not sure.
from cli.
Possibly add Errorf
, Outputf
, Infof
functions?
It would technically change the Ui interface if people have written their own implementations but otherwise would be a noop change for consumers of the library.
from cli.
There could also be a UiFormatter interface that implemented Ui and the formatter functions? That way even if people wrote their own implementations of the interface it would be a noop change?
I'm happy to do the work once you give sign off.
from cli.
That's a good idea. I like the idea of introducing a second interface. If you want to do a PR for that, that would be okay to me.
from cli.
Hey @tarrant, given how long its been I think we've made it long enough that this is okay. We don't want to break BC and the actual other reason we don't do variadics is for a weird reason that this works better with our plugin system.
from cli.
Related Issues (20)
- Root command
- Replace current completion generation package with something else HOT 1
- Sporadic test failures in "TestCLIRun_printCommandHelpSubcommands" HOT 5
- please tag and version this project HOT 9
- Top level help shows all subcommand children HOT 2
- Compatibility with standard library `flag` package HOT 3
- Generate help text from command options HOT 2
- Nested Subcommand Help HOT 3
- Flag named version causes application version to be printed incorrectly HOT 1
- Mark commands (and flags) as hidden HOT 5
- panic if a subcommand is wrapped in double quotes and contains spaces HOT 2
- is there support for interactive mode? HOT 3
- default subcommand throws stack overflow HOT 2
- 1.0.0: FAIL: TestCLIAutocomplete_subcommandArgs/RE HOT 1
- Versus cobra cli HOT 1
- How to write shell completion function in Go
- Subcommand parsing logic stops at first flag HOT 3
- Subcommand parsing: "fooasdf -o=foo" is incorrectly identified as the subcommand "foo"
- Update github.com/Masterminds/sprig HOT 1
- Add flags dynamically HOT 1
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 cli.