Cleanup cobra integration
Update windows files for cobra and pflags
Cleanup SetupRootcmd, and remove unnecessary SetFlagErrorFunc.
Use cobra command traversal
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This fix is part of the effort to convert commands to spf13/cobra #23211.
Thif fix coverted command `docker commit` to use spf13/cobra
NOTE: `RequiresMinMaxArgs()` has been renamed to `RequiresRangeArgs()`.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix is part of the effort to convert commands to spf13/cobra #23211.
Thif fix coverted command `docker port` to use spf13/cobra
Note: As part of this fix, a new function `RequiresMinMaxArgs(min int, max int)`
has been added in cli/required.go. This function restrict the args
to be at least min and at most max.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>