Use spf13/cobra for docker network and subcommands#23210
Use spf13/cobra for docker network and subcommands#23210thaJeztah merged 1 commit intomoby:masterfrom
Conversation
c90d150 to
7b07d4c
Compare
There was a problem hiding this comment.
I think it would be better to continue to use opts.NewListOpts(runconfigopts.ValidateLink) for this. It's nice when all the flag/arg validation happens at the same spot, so the error messages are consistent (you get the usage message). You can use it with flags.Var(&opts.links, ...) by making the type opts.ListOpts, and setting the default value when you declare opts.
With this setup I don't think you'll get the usage info.
There was a problem hiding this comment.
Nice! I was thinking maybe ExactArgs(number int), what do you think?
There was a problem hiding this comment.
Sounds better, I'll update 😉
7b07d4c to
28d5815
Compare
|
built and tried this, and all looks to be working correctly 👍 |
|
ping @dnephin PTAL, its green 💚 |
|
LGTM! |
28d5815 to
2ebb612
Compare
|
Rebased 👼 |
2ebb612 to
47d39d6
Compare
22232f8 to
e833b3c
Compare
- Migrates network command and subcommands (connect, create, disconnect, inspect, list and remove) to spf13/cobra - Create a RequiredExactArgs helper function for command that require an exact number of arguments. Signed-off-by: Vincent Demeester <[email protected]>
e833b3c to
4bd202b
Compare
|
LGTM Janky is green, but didn't notify GitHub; https://jenkins.dockerproject.org/job/Docker-PRs/28337/console |
networkcommand and subcommands (connect,create,disconnect,inspect,listandremove) to spf13/cobra 🐍./cc @dnephin @thaJeztah @LK4D4
🐸
Signed-off-by: Vincent Demeester [email protected]