-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net: add IP.IsPrivate #42793
net: add IP.IsPrivate #42793
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
This PR (HEAD: c73fccc) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
Message from Go Bot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from 6543: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Any progress on the fantastic feature?? |
@bl-ue feature-freeze (this pull will go into 1.17, if all works well) |
Thank you @6543! I love this feature and can't wait for 1.17. |
This PR (HEAD: 70091ec) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
70091ec
to
bb09bf6
Compare
This PR (HEAD: bb09bf6) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
bb09bf6
to
29178a0
Compare
This PR (HEAD: 29178a0) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
29178a0
to
b0729da
Compare
This PR (HEAD: b0729da) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
Message from Ian Lance Taylor: Patch Set 5: Run-TryBot+1 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 5: TryBots beginning. Status page: https://farmer.golang.org/try?commit=e4601796 Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 5: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 5: TryBot-Result-1 1 of 21 TryBots failed: Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Ian Lance Taylor: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
This PR (HEAD: 1c40030) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
Message from 6543: Patch Set 7: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Emmanuel Odeke: Patch Set 7: Run-TryBot+1 (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 7: TryBots beginning. Status page: https://farmer.golang.org/try?commit=e42efd82 Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 7: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
This PR (HEAD: ad0bdb4) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
Message from 6543: Patch Set 8: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Emmanuel Odeke: Patch Set 8: Thanks, but I was requesting you add them inside the code and not in the Godoc which would be an unnecessary explanation for the regular consumer. The comment inside the code is for maintainers and others peering deep, please change to the prior suggestion and add them in the related code sections as I had exhibited. Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
@6543 please take a look at, and address the feedback that I provided, then we’ll be ready to go. Thank you. |
just had no time to allocate it to this :) |
Add IsPrivate() helper to check if an IP is private according to RFC 1918 & RFC 4193 Fixes golang#29146
@odeke-em hope, I got it right this time 🚀 |
Message from 6543: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
This PR (HEAD: 09f4ba7) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/272668 to see it. Tip: You can toggle comments from me using the |
Message from 6543: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Emmanuel Odeke: Patch Set 10: Run-TryBot+1 Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
Message from Go Bot: Patch Set 10: TryBots beginning. Status page: https://farmer.golang.org/try?commit=f77a2cf4 Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
@6543 you got it, congrats and thank you! |
Adds a new method IsPrivate to check if an IP is private according to RFC 1918 & RFC 4193. Fixes #29146 Change-Id: If77b9e1746d86029df66ae9f18437b1f65a18b59 GitHub-Last-Rev: 09f4ba7 GitHub-Pull-Request: #42793 Reviewed-on: https://go-review.googlesource.com/c/go/+/272668 Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com> TryBot-Result: Go Bot <gobot@golang.org>
Message from Go Bot: Patch Set 10: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/272668. |
This PR is being closed because golang.org/cl/272668 has been merged. |
🎊 🎉 🚀 |
Adds a new method IsPrivate to check if an IP is
private according to RFC 1918 & RFC 4193.
Fixes #29146