build(deps): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.2
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.1 to 2.27.2. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/urfave/cli/compare/v2.27.1...v2.27.2) --- updated-dependencies: - dependency-name: github.com/urfave/cli/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
7feb1f327d
commit
81a9df625b
6
go.mod
6
go.mod
@ -56,7 +56,7 @@ require (
|
|||||||
github.com/sirupsen/logrus v1.9.3
|
github.com/sirupsen/logrus v1.9.3
|
||||||
github.com/stretchr/testify v1.9.0
|
github.com/stretchr/testify v1.9.0
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1
|
github.com/tchap/go-patricia/v2 v2.3.1
|
||||||
github.com/urfave/cli/v2 v2.27.1
|
github.com/urfave/cli/v2 v2.27.2
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2
|
github.com/vishvananda/netlink v1.2.1-beta.2
|
||||||
go.etcd.io/bbolt v1.3.9
|
go.etcd.io/bbolt v1.3.9
|
||||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0
|
||||||
@ -89,7 +89,7 @@ require (
|
|||||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||||
github.com/cilium/ebpf v0.11.0 // indirect
|
github.com/cilium/ebpf v0.11.0 // indirect
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
||||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||||
github.com/go-logr/logr v1.4.1 // indirect
|
github.com/go-logr/logr v1.4.1 // indirect
|
||||||
@ -118,7 +118,7 @@ require (
|
|||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
|
||||||
github.com/vishvananda/netns v0.0.4 // indirect
|
github.com/vishvananda/netns v0.0.4 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
|
||||||
go.opencensus.io v0.24.0 // indirect
|
go.opencensus.io v0.24.0 // indirect
|
||||||
go.opentelemetry.io/otel/metric v1.25.0 // indirect
|
go.opentelemetry.io/otel/metric v1.25.0 // indirect
|
||||||
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
|
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
|
||||||
|
12
go.sum
12
go.sum
@ -106,8 +106,8 @@ github.com/containernetworking/plugins v1.4.1 h1:+sJRRv8PKhLkXIl6tH1D7RMi+CbbHut
|
|||||||
github.com/containernetworking/plugins v1.4.1/go.mod h1:n6FFGKcaY4o2o5msgu/UImtoC+fpQXM3076VHfHbj60=
|
github.com/containernetworking/plugins v1.4.1/go.mod h1:n6FFGKcaY4o2o5msgu/UImtoC+fpQXM3076VHfHbj60=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
|
||||||
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@ -381,8 +381,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG
|
|||||||
github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes=
|
github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BGhTkes=
|
||||||
github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
|
github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k=
|
||||||
github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
github.com/urfave/cli v1.19.1/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
|
||||||
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
|
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI=
|
||||||
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
|
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM=
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
|
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
|
||||||
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
|
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
|
||||||
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
|
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
|
||||||
@ -395,8 +395,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
|
|||||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
|
||||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||||
|
6
vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
generated
vendored
6
vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
generated
vendored
@ -9,6 +9,8 @@ func Render(doc []byte) []byte {
|
|||||||
renderer := NewRoffRenderer()
|
renderer := NewRoffRenderer()
|
||||||
|
|
||||||
return blackfriday.Run(doc,
|
return blackfriday.Run(doc,
|
||||||
[]blackfriday.Option{blackfriday.WithRenderer(renderer),
|
[]blackfriday.Option{
|
||||||
blackfriday.WithExtensions(renderer.GetExtensions())}...)
|
blackfriday.WithRenderer(renderer),
|
||||||
|
blackfriday.WithExtensions(renderer.GetExtensions()),
|
||||||
|
}...)
|
||||||
}
|
}
|
||||||
|
64
vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
generated
vendored
64
vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
generated
vendored
@ -1,6 +1,8 @@
|
|||||||
package md2man
|
package md2man
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@ -34,10 +36,10 @@ const (
|
|||||||
hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
|
hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
|
||||||
linkTag = "\n\\[la]"
|
linkTag = "\n\\[la]"
|
||||||
linkCloseTag = "\\[ra]"
|
linkCloseTag = "\\[ra]"
|
||||||
codespanTag = "\\fB\\fC"
|
codespanTag = "\\fB"
|
||||||
codespanCloseTag = "\\fR"
|
codespanCloseTag = "\\fR"
|
||||||
codeTag = "\n.PP\n.RS\n\n.nf\n"
|
codeTag = "\n.EX\n"
|
||||||
codeCloseTag = "\n.fi\n.RE\n"
|
codeCloseTag = ".EE\n" // Do not prepend a newline character since code blocks, by definition, include a newline already (or at least as how blackfriday gives us on).
|
||||||
quoteTag = "\n.PP\n.RS\n"
|
quoteTag = "\n.PP\n.RS\n"
|
||||||
quoteCloseTag = "\n.RE\n"
|
quoteCloseTag = "\n.RE\n"
|
||||||
listTag = "\n.RS\n"
|
listTag = "\n.RS\n"
|
||||||
@ -48,6 +50,7 @@ const (
|
|||||||
tableEnd = ".TE\n"
|
tableEnd = ".TE\n"
|
||||||
tableCellStart = "T{\n"
|
tableCellStart = "T{\n"
|
||||||
tableCellEnd = "\nT}\n"
|
tableCellEnd = "\nT}\n"
|
||||||
|
tablePreprocessor = `'\" t`
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
|
// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
|
||||||
@ -74,6 +77,16 @@ func (r *roffRenderer) GetExtensions() blackfriday.Extensions {
|
|||||||
|
|
||||||
// RenderHeader handles outputting the header at document start
|
// RenderHeader handles outputting the header at document start
|
||||||
func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
|
func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
|
||||||
|
// We need to walk the tree to check if there are any tables.
|
||||||
|
// If there are, we need to enable the roff table preprocessor.
|
||||||
|
ast.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
|
||||||
|
if node.Type == blackfriday.Table {
|
||||||
|
out(w, tablePreprocessor+"\n")
|
||||||
|
return blackfriday.Terminate
|
||||||
|
}
|
||||||
|
return blackfriday.GoToNext
|
||||||
|
})
|
||||||
|
|
||||||
// disable hyphenation
|
// disable hyphenation
|
||||||
out(w, ".nh\n")
|
out(w, ".nh\n")
|
||||||
}
|
}
|
||||||
@ -86,8 +99,7 @@ func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node) {
|
|||||||
// RenderNode is called for each node in a markdown document; based on the node
|
// RenderNode is called for each node in a markdown document; based on the node
|
||||||
// type the equivalent roff output is sent to the writer
|
// type the equivalent roff output is sent to the writer
|
||||||
func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
|
func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
|
||||||
|
walkAction := blackfriday.GoToNext
|
||||||
var walkAction = blackfriday.GoToNext
|
|
||||||
|
|
||||||
switch node.Type {
|
switch node.Type {
|
||||||
case blackfriday.Text:
|
case blackfriday.Text:
|
||||||
@ -109,9 +121,16 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering
|
|||||||
out(w, strongCloseTag)
|
out(w, strongCloseTag)
|
||||||
}
|
}
|
||||||
case blackfriday.Link:
|
case blackfriday.Link:
|
||||||
if !entering {
|
// Don't render the link text for automatic links, because this
|
||||||
out(w, linkTag+string(node.LinkData.Destination)+linkCloseTag)
|
// will only duplicate the URL in the roff output.
|
||||||
|
// See https://daringfireball.net/projects/markdown/syntax#autolink
|
||||||
|
if !bytes.Equal(node.LinkData.Destination, node.FirstChild.Literal) {
|
||||||
|
out(w, string(node.FirstChild.Literal))
|
||||||
}
|
}
|
||||||
|
// Hyphens in a link must be escaped to avoid word-wrap in the rendered man page.
|
||||||
|
escapedLink := strings.ReplaceAll(string(node.LinkData.Destination), "-", "\\-")
|
||||||
|
out(w, linkTag+escapedLink+linkCloseTag)
|
||||||
|
walkAction = blackfriday.SkipChildren
|
||||||
case blackfriday.Image:
|
case blackfriday.Image:
|
||||||
// ignore images
|
// ignore images
|
||||||
walkAction = blackfriday.SkipChildren
|
walkAction = blackfriday.SkipChildren
|
||||||
@ -160,6 +179,11 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering
|
|||||||
r.handleTableCell(w, node, entering)
|
r.handleTableCell(w, node, entering)
|
||||||
case blackfriday.HTMLSpan:
|
case blackfriday.HTMLSpan:
|
||||||
// ignore other HTML tags
|
// ignore other HTML tags
|
||||||
|
case blackfriday.HTMLBlock:
|
||||||
|
if bytes.HasPrefix(node.Literal, []byte("<!--")) {
|
||||||
|
break // ignore comments, no warning
|
||||||
|
}
|
||||||
|
fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
|
||||||
default:
|
default:
|
||||||
fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
|
fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
|
||||||
}
|
}
|
||||||
@ -254,7 +278,7 @@ func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, ente
|
|||||||
start = "\t"
|
start = "\t"
|
||||||
}
|
}
|
||||||
if node.IsHeader {
|
if node.IsHeader {
|
||||||
start += codespanTag
|
start += strongTag
|
||||||
} else if nodeLiteralSize(node) > 30 {
|
} else if nodeLiteralSize(node) > 30 {
|
||||||
start += tableCellStart
|
start += tableCellStart
|
||||||
}
|
}
|
||||||
@ -262,7 +286,7 @@ func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, ente
|
|||||||
} else {
|
} else {
|
||||||
var end string
|
var end string
|
||||||
if node.IsHeader {
|
if node.IsHeader {
|
||||||
end = codespanCloseTag
|
end = strongCloseTag
|
||||||
} else if nodeLiteralSize(node) > 30 {
|
} else if nodeLiteralSize(node) > 30 {
|
||||||
end = tableCellEnd
|
end = tableCellEnd
|
||||||
}
|
}
|
||||||
@ -310,6 +334,28 @@ func out(w io.Writer, output string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func escapeSpecialChars(w io.Writer, text []byte) {
|
func escapeSpecialChars(w io.Writer, text []byte) {
|
||||||
|
scanner := bufio.NewScanner(bytes.NewReader(text))
|
||||||
|
|
||||||
|
// count the number of lines in the text
|
||||||
|
// we need to know this to avoid adding a newline after the last line
|
||||||
|
n := bytes.Count(text, []byte{'\n'})
|
||||||
|
idx := 0
|
||||||
|
|
||||||
|
for scanner.Scan() {
|
||||||
|
dt := scanner.Bytes()
|
||||||
|
if idx < n {
|
||||||
|
idx++
|
||||||
|
dt = append(dt, '\n')
|
||||||
|
}
|
||||||
|
escapeSpecialCharsLine(w, dt)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := scanner.Err(); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func escapeSpecialCharsLine(w io.Writer, text []byte) {
|
||||||
for i := 0; i < len(text); i++ {
|
for i := 0; i < len(text); i++ {
|
||||||
// escape initial apostrophe or period
|
// escape initial apostrophe or period
|
||||||
if len(text) >= 1 && (text[0] == '\'' || text[0] == '.') {
|
if len(text) >= 1 && (text[0] == '\'' || text[0] == '.') {
|
||||||
|
4
vendor/github.com/urfave/cli/v2/app.go
generated
vendored
4
vendor/github.com/urfave/cli/v2/app.go
generated
vendored
@ -229,8 +229,6 @@ func (a *App) Setup() {
|
|||||||
a.separator.disabled = true
|
a.separator.disabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
var newCommands []*Command
|
|
||||||
|
|
||||||
for _, c := range a.Commands {
|
for _, c := range a.Commands {
|
||||||
cname := c.Name
|
cname := c.Name
|
||||||
if c.HelpName != "" {
|
if c.HelpName != "" {
|
||||||
@ -239,9 +237,7 @@ func (a *App) Setup() {
|
|||||||
c.separator = a.separator
|
c.separator = a.separator
|
||||||
c.HelpName = fmt.Sprintf("%s %s", a.HelpName, cname)
|
c.HelpName = fmt.Sprintf("%s %s", a.HelpName, cname)
|
||||||
c.flagCategories = newFlagCategoriesFromFlags(c.Flags)
|
c.flagCategories = newFlagCategoriesFromFlags(c.Flags)
|
||||||
newCommands = append(newCommands, c)
|
|
||||||
}
|
}
|
||||||
a.Commands = newCommands
|
|
||||||
|
|
||||||
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
|
if a.Command(helpCommand.Name) == nil && !a.HideHelp {
|
||||||
if !a.HideHelpCommand {
|
if !a.HideHelpCommand {
|
||||||
|
4
vendor/github.com/urfave/cli/v2/category.go
generated
vendored
4
vendor/github.com/urfave/cli/v2/category.go
generated
vendored
@ -104,7 +104,7 @@ func newFlagCategoriesFromFlags(fs []Flag) FlagCategories {
|
|||||||
var categorized bool
|
var categorized bool
|
||||||
for _, fl := range fs {
|
for _, fl := range fs {
|
||||||
if cf, ok := fl.(CategorizableFlag); ok {
|
if cf, ok := fl.(CategorizableFlag); ok {
|
||||||
if cat := cf.GetCategory(); cat != "" {
|
if cat := cf.GetCategory(); cat != "" && cf.IsVisible() {
|
||||||
fc.AddFlag(cat, cf)
|
fc.AddFlag(cat, cf)
|
||||||
categorized = true
|
categorized = true
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ func newFlagCategoriesFromFlags(fs []Flag) FlagCategories {
|
|||||||
if categorized {
|
if categorized {
|
||||||
for _, fl := range fs {
|
for _, fl := range fs {
|
||||||
if cf, ok := fl.(CategorizableFlag); ok {
|
if cf, ok := fl.(CategorizableFlag); ok {
|
||||||
if cf.GetCategory() == "" {
|
if cf.GetCategory() == "" && cf.IsVisible() {
|
||||||
fc.AddFlag("", fl)
|
fc.AddFlag("", fl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/urfave/cli/v2/command.go
generated
vendored
3
vendor/github.com/urfave/cli/v2/command.go
generated
vendored
@ -132,15 +132,12 @@ func (c *Command) setup(ctx *Context) {
|
|||||||
}
|
}
|
||||||
sort.Sort(c.categories.(*commandCategories))
|
sort.Sort(c.categories.(*commandCategories))
|
||||||
|
|
||||||
var newCmds []*Command
|
|
||||||
for _, scmd := range c.Subcommands {
|
for _, scmd := range c.Subcommands {
|
||||||
if scmd.HelpName == "" {
|
if scmd.HelpName == "" {
|
||||||
scmd.HelpName = fmt.Sprintf("%s %s", c.HelpName, scmd.Name)
|
scmd.HelpName = fmt.Sprintf("%s %s", c.HelpName, scmd.Name)
|
||||||
}
|
}
|
||||||
scmd.separator = c.separator
|
scmd.separator = c.separator
|
||||||
newCmds = append(newCmds, scmd)
|
|
||||||
}
|
}
|
||||||
c.Subcommands = newCmds
|
|
||||||
|
|
||||||
if c.BashComplete == nil {
|
if c.BashComplete == nil {
|
||||||
c.BashComplete = DefaultCompleteWithFlags(c)
|
c.BashComplete = DefaultCompleteWithFlags(c)
|
||||||
|
2
vendor/github.com/urfave/cli/v2/template.go
generated
vendored
2
vendor/github.com/urfave/cli/v2/template.go
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
package cli
|
package cli
|
||||||
|
|
||||||
var helpNameTemplate = `{{$v := offset .HelpName 6}}{{wrap .HelpName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}`
|
var helpNameTemplate = `{{$v := offset .HelpName 6}}{{wrap .HelpName 3}}{{if .Usage}} - {{wrap .Usage $v}}{{end}}`
|
||||||
var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}}[arguments...]{{end}}[arguments...]{{end}}{{end}}`
|
var usageTemplate = `{{if .UsageText}}{{wrap .UsageText 3}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}}{{if .ArgsUsage}}{{.ArgsUsage}}{{else}}{{if .Args}} [arguments...]{{end}}{{end}}{{end}}`
|
||||||
var descriptionTemplate = `{{wrap .Description 3}}`
|
var descriptionTemplate = `{{wrap .Description 3}}`
|
||||||
var authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
|
var authorsTemplate = `{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
|
||||||
{{range $index, $author := .Authors}}{{if $index}}
|
{{range $index, $author := .Authors}}{{if $index}}
|
||||||
|
58
vendor/github.com/xrash/smetrics/soundex.go
generated
vendored
58
vendor/github.com/xrash/smetrics/soundex.go
generated
vendored
@ -6,36 +6,58 @@ import (
|
|||||||
|
|
||||||
// The Soundex encoding. It is a phonetic algorithm that considers how the words sound in English. Soundex maps a string to a 4-byte code consisting of the first letter of the original string and three numbers. Strings that sound similar should map to the same code.
|
// The Soundex encoding. It is a phonetic algorithm that considers how the words sound in English. Soundex maps a string to a 4-byte code consisting of the first letter of the original string and three numbers. Strings that sound similar should map to the same code.
|
||||||
func Soundex(s string) string {
|
func Soundex(s string) string {
|
||||||
m := map[byte]string{
|
b := strings.Builder{}
|
||||||
'B': "1", 'P': "1", 'F': "1", 'V': "1",
|
b.Grow(4)
|
||||||
'C': "2", 'S': "2", 'K': "2", 'G': "2", 'J': "2", 'Q': "2", 'X': "2", 'Z': "2",
|
|
||||||
'D': "3", 'T': "3",
|
|
||||||
'L': "4",
|
|
||||||
'M': "5", 'N': "5",
|
|
||||||
'R': "6",
|
|
||||||
}
|
|
||||||
|
|
||||||
s = strings.ToUpper(s)
|
|
||||||
|
|
||||||
r := string(s[0])
|
|
||||||
p := s[0]
|
p := s[0]
|
||||||
for i := 1; i < len(s) && len(r) < 4; i++ {
|
if p <= 'z' && p >= 'a' {
|
||||||
|
p -= 32 // convert to uppercase
|
||||||
|
}
|
||||||
|
b.WriteByte(p)
|
||||||
|
|
||||||
|
n := 0
|
||||||
|
for i := 1; i < len(s); i++ {
|
||||||
c := s[i]
|
c := s[i]
|
||||||
|
|
||||||
if (c < 'A' || c > 'Z') || (c == p) {
|
if c <= 'z' && c >= 'a' {
|
||||||
|
c -= 32 // convert to uppercase
|
||||||
|
} else if c < 'A' || c > 'Z' {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if c == p {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
p = c
|
p = c
|
||||||
|
|
||||||
if n, ok := m[c]; ok {
|
switch c {
|
||||||
r += n
|
case 'B', 'P', 'F', 'V':
|
||||||
|
c = '1'
|
||||||
|
case 'C', 'S', 'K', 'G', 'J', 'Q', 'X', 'Z':
|
||||||
|
c = '2'
|
||||||
|
case 'D', 'T':
|
||||||
|
c = '3'
|
||||||
|
case 'L':
|
||||||
|
c = '4'
|
||||||
|
case 'M', 'N':
|
||||||
|
c = '5'
|
||||||
|
case 'R':
|
||||||
|
c = '6'
|
||||||
|
default:
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
b.WriteByte(c)
|
||||||
|
n++
|
||||||
|
if n == 3 {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := len(r); i < 4; i++ {
|
for i := n; i < 3; i++ {
|
||||||
r += "0"
|
b.WriteByte('0')
|
||||||
}
|
}
|
||||||
|
|
||||||
return r
|
return b.String()
|
||||||
}
|
}
|
||||||
|
8
vendor/modules.txt
vendored
8
vendor/modules.txt
vendored
@ -182,7 +182,7 @@ github.com/containernetworking/plugins/pkg/ns
|
|||||||
## explicit; go 1.12
|
## explicit; go 1.12
|
||||||
github.com/coreos/go-systemd/v22/daemon
|
github.com/coreos/go-systemd/v22/daemon
|
||||||
github.com/coreos/go-systemd/v22/dbus
|
github.com/coreos/go-systemd/v22/dbus
|
||||||
# github.com/cpuguy83/go-md2man/v2 v2.0.2
|
# github.com/cpuguy83/go-md2man/v2 v2.0.4
|
||||||
## explicit; go 1.11
|
## explicit; go 1.11
|
||||||
github.com/cpuguy83/go-md2man/v2/md2man
|
github.com/cpuguy83/go-md2man/v2/md2man
|
||||||
# github.com/davecgh/go-spew v1.1.1
|
# github.com/davecgh/go-spew v1.1.1
|
||||||
@ -395,7 +395,7 @@ github.com/syndtr/gocapability/capability
|
|||||||
# github.com/tchap/go-patricia/v2 v2.3.1
|
# github.com/tchap/go-patricia/v2 v2.3.1
|
||||||
## explicit; go 1.16
|
## explicit; go 1.16
|
||||||
github.com/tchap/go-patricia/v2/patricia
|
github.com/tchap/go-patricia/v2/patricia
|
||||||
# github.com/urfave/cli/v2 v2.27.1
|
# github.com/urfave/cli/v2 v2.27.2
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/urfave/cli/v2
|
github.com/urfave/cli/v2
|
||||||
# github.com/vishvananda/netlink v1.2.1-beta.2
|
# github.com/vishvananda/netlink v1.2.1-beta.2
|
||||||
@ -405,8 +405,8 @@ github.com/vishvananda/netlink/nl
|
|||||||
# github.com/vishvananda/netns v0.0.4
|
# github.com/vishvananda/netns v0.0.4
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/vishvananda/netns
|
github.com/vishvananda/netns
|
||||||
# github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
|
# github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913
|
||||||
## explicit
|
## explicit; go 1.15.0
|
||||||
github.com/xrash/smetrics
|
github.com/xrash/smetrics
|
||||||
# go.etcd.io/bbolt v1.3.9
|
# go.etcd.io/bbolt v1.3.9
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
|
Loading…
Reference in New Issue
Block a user