Comments (4)
I think this is going to be problematic when the arguments clash, i-e, both tools offer a -b
, --help
etc, and makes it difficult to show intuitive help. It would also make it difficult to determine unhandled arguments and raise an error if a user tries to use an option or subcommand that does not exist.
I'd propose that Curassow provides an API that you can use to serve instead of using the command line interface, so you're free to add whatever handling you want. How does this sound?
from commander.
You're right, that's definitely a better way to do it. Let me know when there's an issue on Curassow that I can track, thanks!
from commander.
Perhaps it makes sense to go into kylef-archive/Curassow#12. That way, you can make an instance of the arbiter and run it.
let arbiter = Arbiter<SyncronousWorker>(workers: 3, addresses: [], timeout: 20, application: app)
try arbiter.run()
from commander.
Hmm that's fair, but I really like how I didn't have to worry about such details with serve()
. Maybe just add another overloaded version of serve
, which will take those three parameters, in addition to the application? And then make the current serve
run Commander and pass the params into the new one? That way I can just use the non-CLI version of serve
, and I still don't touch the implementation details (as much anyway) of Curassow.
from commander.
Related Issues (20)
- 0.7.1 doesn't build on linux HOT 2
- Using the argument parser HOT 1
- Commander Package.swift --> targets error HOT 2
- Printing the default value of a string enum? HOT 2
- SPM: dependency graph is unresolvable HOT 5
- Arguments not printing HOT 2
- Fix license file template placeholder
- PromiseKit extension
- Are optional options available? HOT 2
- How to add shortflag option?
- add Flag.flag to help text HOT 1
- Xcode console not supporting colors
- Not-returning CLI and passing commands to command.run() HOT 1
- Maximum number of arguments increase? HOT 7
- Unknown Arguments trigger displays garbled user input HOT 5
- Cannot define an argument named `version` HOT 4
- Bad help description for options with nil default value
- 0.9.0 broke positional argument passing HOT 2
- Impossible to pass a negative number as the value for an option HOT 3
- Add repository topics to improve GitHub "searchability"
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 commander.