-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vendor: github.com/spf13/pflag v1.0.6, remove local IPNetSliceVar fork #5817
Conversation
- Add exported functions to preserve pkg/flag compatibility - Add IPNetSlice and unit tests - Revert the local fork added in 80a2256, which was pending the upstream feature to be shipped in a release. full diff: spf13/pflag@v1.0.5...v1.0.6 Revert "Swarm init: use local IPNetSliceValue" This reverts commit 80a2256. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping putting them in the same commit would make git / github show this as a lateral move, as they were mostly identical originally, but possibly som changes were made after to make them different enough to not being shown as a "move" 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, probably because I used a minimal fork, and didn't include everything, that would explain
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5817 +/- ##
==========================================
- Coverage 59.28% 59.25% -0.03%
==========================================
Files 353 352 -1
Lines 29550 29496 -54
==========================================
- Hits 17518 17479 -39
+ Misses 11052 11042 -10
+ Partials 980 975 -5 |
@@ -57,7 +57,7 @@ func newInitCommand(dockerCli command.Cli) *cobra.Command { | |||
flags.BoolVar(&opts.forceNewCluster, "force-new-cluster", false, "Force create a new cluster from current state") | |||
flags.BoolVar(&opts.autolock, flagAutolock, false, "Enable manager autolocking (requiring an unlock key to start a stopped manager)") | |||
flags.StringVar(&opts.availability, flagAvailability, "active", `Availability of the node ("active", "pause", "drain")`) | |||
flags.Var(newIPNetSliceValue([]net.IPNet{}, &opts.defaultAddrPools), flagDefaultAddrPool, "default address pool in CIDR format") | |||
flags.IPNetSliceVar(&opts.defaultAddrPools, flagDefaultAddrPool, []net.IPNet{}, "default address pool in CIDR format") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future self; I wonder if nil
vs []net.IPNet{}
makes a difference for "default"; this was what we had before we added the fork, so I used that, but wasn't 100% sure if it made a difference.
vendor: github.com/spf13/pflag v1.0.6, remove local IPNetSliceVar fork
full diff: spf13/pflag@v1.0.5...v1.0.6
Revert "Swarm init: use local IPNetSliceValue"
This reverts commit 80a2256.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)