Skip to content
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

Add IPNetSlice and unit tests #170

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Add IPNetSlice and unit tests #170

merged 1 commit into from
Oct 9, 2020

Conversation

rpothier
Copy link

This adds slices for IPNet.
This is needed for IPv4, IPv6 dual stack in kubernetes.

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2018

CLA assistant check
All committers have signed the CLA.

@thaJeztah
Copy link

ping @eparis @spf13 ptal 🤗

func (s *ipNetSliceValue) Set(val string) error {

// remove all quote characters
rmQuote := strings.NewReplacer(`"`, "", `'`, "", "`", "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do I need the stripping?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit tests are modeled after ip_slice tests, which one of the tests is to test bad quoting.
The quotes need to be removed to handle this case of funny quoting.
If this is not needed, I can remove it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eparis I answered the question, please let me know if this is still a concern.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @eparis ptal 😅

@rpothier
Copy link
Author

@eparis If you have a chance, can you take another look at this?
This is needed for the Dual Stack feature in Kubernetes - kubernetes/community#2254

@AkihiroSuda
Copy link

ping @spf13 @eparis

@thaJeztah
Copy link

ping @spf13 @eparis PTAL; is there anything outstanding to get this merged?

@Arvinderpal
Copy link

@thaJeztah @eparis can we merge this? I believe @rpothier is no longer working on the dual-stack work in kubernetes but this feature would be very helpful to others who are. Thank you.

@thaJeztah
Copy link

thaJeztah commented Jun 2, 2019

I'm not a maintainer in this repository, and don't have write access.

@spf13 any way you could help getting this moving?

@rpothier
Copy link
Author

rpothier commented Jun 2, 2019

Yea, I've been reassigned and no longer on Kubernetes.
Still I hope this goes in.

@thaJeztah
Copy link

@therealmitchconnors @eparis PTAL 🙏

@eparis eparis merged commit 85dd5c8 into spf13:master Oct 9, 2020
cornfeedhobo added a commit to cornfeedhobo/pflag that referenced this pull request Oct 10, 2020
@thaJeztah
Copy link

Thanks!

cornfeedhobo pushed a commit to cornfeedhobo/pflag that referenced this pull request Mar 10, 2021
algitbot pushed a commit to alpinelinux/build-server-status that referenced this pull request Jan 30, 2025
This MR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/spf13/pflag](https://github.com/spf13/pflag) | require | patch | `v1.0.5` -> `v1.0.6` |

---

### Release Notes

<details>
<summary>spf13/pflag (github.com/spf13/pflag)</summary>

### [`v1.0.6`](https://github.com/spf13/pflag/releases/tag/v1.0.6)

[Compare Source](spf13/pflag@v1.0.5...v1.0.6)

#### What's Changed

-   Add exported functions to preserve `pkg/flag` compatibility by [@&#8203;mckern](https://github.com/mckern) in spf13/pflag#220
-   remove dead code for checking error nil by [@&#8203;yashbhutwala](https://github.com/yashbhutwala) in spf13/pflag#282
-   Add IPNetSlice and unit tests by [@&#8203;rpothier](https://github.com/rpothier) in spf13/pflag#170
-   allow for blank ip addresses by [@&#8203;duhruh](https://github.com/duhruh) in spf13/pflag#316
-   add github actions by [@&#8203;sagikazarmark](https://github.com/sagikazarmark) in spf13/pflag#419

#### New Contributors

-   [@&#8203;mckern](https://github.com/mckern) made their first contribution in spf13/pflag#220
-   [@&#8203;yashbhutwala](https://github.com/yashbhutwala) made their first contribution in spf13/pflag#282
-   [@&#8203;rpothier](https://github.com/rpothier) made their first contribution in spf13/pflag#170
-   [@&#8203;duhruh](https://github.com/duhruh) made their first contribution in spf13/pflag#316
-   [@&#8203;sagikazarmark](https://github.com/sagikazarmark) made their first contribution in spf13/pflag#419

**Full Changelog**: spf13/pflag@v1.0.5...v1.0.6

</details>

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

&nbsp;
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDYuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

See merge request alpine/infra/build-server-status!19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants