summaryrefslogtreecommitdiff
path: root/vendor/github.com/spf13/pflag/ip.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-02-17 11:43:32 +0000
committerLibravatar GitHub <noreply@github.com>2025-02-17 11:43:32 +0000
commitc73497b58ca6e9cf085b91649ccf12c8389baf5c (patch)
tree9e3e4537a6648e1f3009f76a7483a009cc3e58ff /vendor/github.com/spf13/pflag/ip.go
parent[chore]: Bump golang.org/x/net from 0.34.0 to 0.35.0 (#3804) (diff)
downloadgotosocial-c73497b58ca6e9cf085b91649ccf12c8389baf5c.tar.xz
[chore]: Bump github.com/spf13/cobra from 1.8.1 to 1.9.1 (#3805)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.1 to 1.9.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.8.1...v1.9.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/spf13/pflag/ip.go')
-rw-r--r--vendor/github.com/spf13/pflag/ip.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go
index 3d414ba69..06b8bcb57 100644
--- a/vendor/github.com/spf13/pflag/ip.go
+++ b/vendor/github.com/spf13/pflag/ip.go
@@ -16,6 +16,9 @@ func newIPValue(val net.IP, p *net.IP) *ipValue {
func (i *ipValue) String() string { return net.IP(*i).String() }
func (i *ipValue) Set(s string) error {
+ if s == "" {
+ return nil
+ }
ip := net.ParseIP(strings.TrimSpace(s))
if ip == nil {
return fmt.Errorf("failed to parse IP: %q", s)