From 0ab3b02c2c8a12ffab8458decd82f35635d4632d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 27 Apr 2024 17:41:38 +0000 Subject: [PATCH] Update module github.com/urfave/cli/v2 to v2.27.2 --- go.mod | 2 +- go.sum | 10 + .../cpuguy83/go-md2man/v2/md2man/md2man.go | 6 +- .../cpuguy83/go-md2man/v2/md2man/roff.go | 205 +- .../russross/blackfriday/v2/README.md | 90 +- .../russross/blackfriday/v2/block.go | 30 +- .../github.com/russross/blackfriday/v2/doc.go | 28 + .../russross/blackfriday/v2/entities.go | 2236 ++++++++++++++ .../github.com/russross/blackfriday/v2/esc.go | 42 +- .../russross/blackfriday/v2/html.go | 9 +- .../russross/blackfriday/v2/inline.go | 2 +- .../russross/blackfriday/v2/node.go | 12 +- .../sanitized_anchor_name/.travis.yml | 16 - .../shurcooL/sanitized_anchor_name/LICENSE | 21 - .../shurcooL/sanitized_anchor_name/README.md | 36 - .../shurcooL/sanitized_anchor_name/go.mod | 1 - .../shurcooL/sanitized_anchor_name/main.go | 29 - vendor/github.com/urfave/cli/.flake8 | 2 - vendor/github.com/urfave/cli/.gitignore | 4 - .../github.com/urfave/cli/CODE_OF_CONDUCT.md | 74 - vendor/github.com/urfave/cli/LICENSE | 21 - vendor/github.com/urfave/cli/README.md | 70 - vendor/github.com/urfave/cli/app.go | 531 ---- vendor/github.com/urfave/cli/appveyor.yml | 28 - vendor/github.com/urfave/cli/category.go | 44 - vendor/github.com/urfave/cli/cli.go | 22 - vendor/github.com/urfave/cli/command.go | 378 --- vendor/github.com/urfave/cli/context.go | 348 --- vendor/github.com/urfave/cli/docs.go | 148 - vendor/github.com/urfave/cli/errors.go | 115 - vendor/github.com/urfave/cli/fish.go | 194 -- vendor/github.com/urfave/cli/flag.go | 346 --- vendor/github.com/urfave/cli/flag_bool.go | 109 - vendor/github.com/urfave/cli/flag_bool_t.go | 110 - vendor/github.com/urfave/cli/flag_duration.go | 106 - vendor/github.com/urfave/cli/flag_float64.go | 106 - vendor/github.com/urfave/cli/flag_generic.go | 110 - vendor/github.com/urfave/cli/flag_int.go | 105 - vendor/github.com/urfave/cli/flag_int64.go | 106 - .../github.com/urfave/cli/flag_int64_slice.go | 199 -- .../github.com/urfave/cli/flag_int_slice.go | 198 -- vendor/github.com/urfave/cli/flag_string.go | 98 - .../urfave/cli/flag_string_slice.go | 184 -- vendor/github.com/urfave/cli/flag_uint.go | 106 - vendor/github.com/urfave/cli/flag_uint64.go | 106 - vendor/github.com/urfave/cli/funcs.go | 44 - vendor/github.com/urfave/cli/go.mod | 9 - vendor/github.com/urfave/cli/go.sum | 14 - vendor/github.com/urfave/cli/help.go | 363 --- vendor/github.com/urfave/cli/parse.go | 94 - vendor/github.com/urfave/cli/sort.go | 29 - vendor/github.com/urfave/cli/template.go | 121 - vendor/github.com/urfave/cli/v2/.gitignore | 13 +- .../github.com/urfave/cli/v2/.golangci.yaml | 4 + .../urfave/cli/v2/CODE_OF_CONDUCT.md | 11 +- vendor/github.com/urfave/cli/v2/LICENSE | 2 +- vendor/github.com/urfave/cli/v2/Makefile | 26 + vendor/github.com/urfave/cli/v2/README.md | 71 +- vendor/github.com/urfave/cli/v2/app.go | 380 ++- vendor/github.com/urfave/cli/v2/category.go | 109 +- vendor/github.com/urfave/cli/v2/cli.go | 32 +- vendor/github.com/urfave/cli/v2/command.go | 301 +- vendor/github.com/urfave/cli/v2/context.go | 247 +- vendor/github.com/urfave/cli/v2/docs.go | 85 +- vendor/github.com/urfave/cli/v2/errors.go | 45 +- vendor/github.com/urfave/cli/v2/fish.go | 4 +- .../github.com/urfave/cli/v2/flag-spec.yaml | 131 + vendor/github.com/urfave/cli/v2/flag.go | 325 +- vendor/github.com/urfave/cli/v2/flag_bool.go | 144 +- .../github.com/urfave/cli/v2/flag_duration.go | 83 +- vendor/github.com/urfave/cli/v2/flag_ext.go | 48 + .../github.com/urfave/cli/v2/flag_float64.go | 87 +- .../urfave/cli/v2/flag_float64_slice.go | 155 +- .../github.com/urfave/cli/v2/flag_generic.go | 107 +- vendor/github.com/urfave/cli/v2/flag_int.go | 85 +- vendor/github.com/urfave/cli/v2/flag_int64.go | 85 +- .../urfave/cli/v2/flag_int64_slice.go | 158 +- .../urfave/cli/v2/flag_int_slice.go | 157 +- vendor/github.com/urfave/cli/v2/flag_path.go | 99 +- .../github.com/urfave/cli/v2/flag_string.go | 101 +- .../urfave/cli/v2/flag_string_slice.go | 154 +- .../urfave/cli/v2/flag_timestamp.go | 131 +- vendor/github.com/urfave/cli/v2/flag_uint.go | 85 +- .../github.com/urfave/cli/v2/flag_uint64.go | 85 +- .../urfave/cli/v2/flag_uint64_slice.go | 219 ++ .../urfave/cli/v2/flag_uint_slice.go | 230 ++ vendor/github.com/urfave/cli/v2/funcs.go | 9 +- vendor/github.com/urfave/cli/v2/go.mod | 11 +- vendor/github.com/urfave/cli/v2/go.sum | 22 +- .../urfave/cli/v2/godoc-current.txt | 2724 +++++++++++++++++ vendor/github.com/urfave/cli/v2/help.go | 378 ++- .../github.com/urfave/cli/v2/mkdocs-reqs.txt | 5 + vendor/github.com/urfave/cli/v2/mkdocs.yml | 107 + vendor/github.com/urfave/cli/v2/parse.go | 28 +- vendor/github.com/urfave/cli/v2/sliceflag.go | 290 ++ .../github.com/urfave/cli/v2/suggestions.go | 68 + vendor/github.com/urfave/cli/v2/template.go | 95 +- .../urfave/cli/v2/zz_generated.flags.go | 865 ++++++ vendor/github.com/xrash/smetrics/.travis.yml | 9 + vendor/github.com/xrash/smetrics/LICENSE | 21 + vendor/github.com/xrash/smetrics/README.md | 49 + vendor/github.com/xrash/smetrics/doc.go | 19 + vendor/github.com/xrash/smetrics/go.mod | 3 + vendor/github.com/xrash/smetrics/hamming.go | 25 + .../github.com/xrash/smetrics/jaro-winkler.go | 28 + vendor/github.com/xrash/smetrics/jaro.go | 86 + vendor/github.com/xrash/smetrics/soundex.go | 63 + vendor/github.com/xrash/smetrics/ukkonen.go | 94 + .../xrash/smetrics/wagner-fischer.go | 48 + vendor/modules.txt | 11 +- 110 files changed, 10102 insertions(+), 6372 deletions(-) create mode 100644 vendor/github.com/russross/blackfriday/v2/entities.go delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/.travis.yml delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/LICENSE delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/README.md delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/go.mod delete mode 100644 vendor/github.com/shurcooL/sanitized_anchor_name/main.go delete mode 100644 vendor/github.com/urfave/cli/.flake8 delete mode 100644 vendor/github.com/urfave/cli/.gitignore delete mode 100644 vendor/github.com/urfave/cli/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/urfave/cli/LICENSE delete mode 100644 vendor/github.com/urfave/cli/README.md delete mode 100644 vendor/github.com/urfave/cli/app.go delete mode 100644 vendor/github.com/urfave/cli/appveyor.yml delete mode 100644 vendor/github.com/urfave/cli/category.go delete mode 100644 vendor/github.com/urfave/cli/cli.go delete mode 100644 vendor/github.com/urfave/cli/command.go delete mode 100644 vendor/github.com/urfave/cli/context.go delete mode 100644 vendor/github.com/urfave/cli/docs.go delete mode 100644 vendor/github.com/urfave/cli/errors.go delete mode 100644 vendor/github.com/urfave/cli/fish.go delete mode 100644 vendor/github.com/urfave/cli/flag.go delete mode 100644 vendor/github.com/urfave/cli/flag_bool.go delete mode 100644 vendor/github.com/urfave/cli/flag_bool_t.go delete mode 100644 vendor/github.com/urfave/cli/flag_duration.go delete mode 100644 vendor/github.com/urfave/cli/flag_float64.go delete mode 100644 vendor/github.com/urfave/cli/flag_generic.go delete mode 100644 vendor/github.com/urfave/cli/flag_int.go delete mode 100644 vendor/github.com/urfave/cli/flag_int64.go delete mode 100644 vendor/github.com/urfave/cli/flag_int64_slice.go delete mode 100644 vendor/github.com/urfave/cli/flag_int_slice.go delete mode 100644 vendor/github.com/urfave/cli/flag_string.go delete mode 100644 vendor/github.com/urfave/cli/flag_string_slice.go delete mode 100644 vendor/github.com/urfave/cli/flag_uint.go delete mode 100644 vendor/github.com/urfave/cli/flag_uint64.go delete mode 100644 vendor/github.com/urfave/cli/funcs.go delete mode 100644 vendor/github.com/urfave/cli/go.mod delete mode 100644 vendor/github.com/urfave/cli/go.sum delete mode 100644 vendor/github.com/urfave/cli/help.go delete mode 100644 vendor/github.com/urfave/cli/parse.go delete mode 100644 vendor/github.com/urfave/cli/sort.go delete mode 100644 vendor/github.com/urfave/cli/template.go create mode 100644 vendor/github.com/urfave/cli/v2/.golangci.yaml create mode 100644 vendor/github.com/urfave/cli/v2/Makefile create mode 100644 vendor/github.com/urfave/cli/v2/flag-spec.yaml create mode 100644 vendor/github.com/urfave/cli/v2/flag_ext.go create mode 100644 vendor/github.com/urfave/cli/v2/flag_uint64_slice.go create mode 100644 vendor/github.com/urfave/cli/v2/flag_uint_slice.go create mode 100644 vendor/github.com/urfave/cli/v2/godoc-current.txt create mode 100644 vendor/github.com/urfave/cli/v2/mkdocs-reqs.txt create mode 100644 vendor/github.com/urfave/cli/v2/mkdocs.yml create mode 100644 vendor/github.com/urfave/cli/v2/sliceflag.go create mode 100644 vendor/github.com/urfave/cli/v2/suggestions.go create mode 100644 vendor/github.com/urfave/cli/v2/zz_generated.flags.go create mode 100644 vendor/github.com/xrash/smetrics/.travis.yml create mode 100644 vendor/github.com/xrash/smetrics/LICENSE create mode 100644 vendor/github.com/xrash/smetrics/README.md create mode 100644 vendor/github.com/xrash/smetrics/doc.go create mode 100644 vendor/github.com/xrash/smetrics/go.mod create mode 100644 vendor/github.com/xrash/smetrics/hamming.go create mode 100644 vendor/github.com/xrash/smetrics/jaro-winkler.go create mode 100644 vendor/github.com/xrash/smetrics/jaro.go create mode 100644 vendor/github.com/xrash/smetrics/soundex.go create mode 100644 vendor/github.com/xrash/smetrics/ukkonen.go create mode 100644 vendor/github.com/xrash/smetrics/wagner-fischer.go diff --git a/go.mod b/go.mod index b16eed6..81da91d 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( github.com/urfave/cli v1.22.5 - github.com/urfave/cli/v2 v2.3.0 + github.com/urfave/cli/v2 v2.27.2 ) diff --git a/go.sum b/go.sum index 2cbdf69..e9598f0 100644 --- a/go.sum +++ b/go.sum @@ -1,15 +1,25 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= +github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= +github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go index b480056..42bf32a 100644 --- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go +++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go @@ -9,6 +9,8 @@ func Render(doc []byte) []byte { renderer := NewRoffRenderer() return blackfriday.Run(doc, - []blackfriday.Option{blackfriday.WithRenderer(renderer), - blackfriday.WithExtensions(renderer.GetExtensions())}...) + []blackfriday.Option{ + blackfriday.WithRenderer(renderer), + blackfriday.WithExtensions(renderer.GetExtensions()), + }...) } diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go index 0668a66..8a290f1 100644 --- a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go +++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go @@ -1,6 +1,8 @@ package md2man import ( + "bufio" + "bytes" "fmt" "io" "os" @@ -15,38 +17,40 @@ type roffRenderer struct { extensions blackfriday.Extensions listCounters []int firstHeader bool - defineTerm bool + firstDD bool listDepth int } const ( - titleHeader = ".TH " - topLevelHeader = "\n\n.SH " - secondLevelHdr = "\n.SH " - otherHeader = "\n.SS " - crTag = "\n" - emphTag = "\\fI" - emphCloseTag = "\\fP" - strongTag = "\\fB" - strongCloseTag = "\\fP" - breakTag = "\n.br\n" - paraTag = "\n.PP\n" - hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n" - linkTag = "\n\\[la]" - linkCloseTag = "\\[ra]" - codespanTag = "\\fB\\fC" - codespanCloseTag = "\\fR" - codeTag = "\n.PP\n.RS\n\n.nf\n" - codeCloseTag = "\n.fi\n.RE\n" - quoteTag = "\n.PP\n.RS\n" - quoteCloseTag = "\n.RE\n" - listTag = "\n.RS\n" - listCloseTag = "\n.RE\n" - arglistTag = "\n.TP\n" - tableStart = "\n.TS\nallbox;\n" - tableEnd = ".TE\n" - tableCellStart = "T{\n" - tableCellEnd = "\nT}\n" + titleHeader = ".TH " + topLevelHeader = "\n\n.SH " + secondLevelHdr = "\n.SH " + otherHeader = "\n.SS " + crTag = "\n" + emphTag = "\\fI" + emphCloseTag = "\\fP" + strongTag = "\\fB" + strongCloseTag = "\\fP" + breakTag = "\n.br\n" + paraTag = "\n.PP\n" + hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n" + linkTag = "\n\\[la]" + linkCloseTag = "\\[ra]" + codespanTag = "\\fB" + codespanCloseTag = "\\fR" + codeTag = "\n.EX\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" + quoteCloseTag = "\n.RE\n" + listTag = "\n.RS\n" + listCloseTag = "\n.RE\n" + dtTag = "\n.TP\n" + dd2Tag = "\n" + tableStart = "\n.TS\nallbox;\n" + tableEnd = ".TE\n" + tableCellStart = "T{\n" + tableCellEnd = "\nT}\n" + tablePreprocessor = `'\" t` ) // NewRoffRenderer creates a new blackfriday Renderer for generating roff documents @@ -73,6 +77,16 @@ func (r *roffRenderer) GetExtensions() blackfriday.Extensions { // RenderHeader handles outputting the header at document start 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 out(w, ".nh\n") } @@ -85,12 +99,11 @@ func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.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 func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus { - - var walkAction = blackfriday.GoToNext + walkAction := blackfriday.GoToNext switch node.Type { case blackfriday.Text: - r.handleText(w, node, entering) + escapeSpecialChars(w, node.Literal) case blackfriday.Softbreak: out(w, crTag) case blackfriday.Hardbreak: @@ -108,9 +121,16 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering out(w, strongCloseTag) } case blackfriday.Link: - if !entering { - out(w, linkTag+string(node.LinkData.Destination)+linkCloseTag) + // Don't render the link text for automatic links, because this + // 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: // ignore images walkAction = blackfriday.SkipChildren @@ -150,40 +170,26 @@ func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering out(w, codeCloseTag) case blackfriday.Table: r.handleTable(w, node, entering) - case blackfriday.TableCell: - r.handleTableCell(w, node, entering) case blackfriday.TableHead: case blackfriday.TableBody: case blackfriday.TableRow: // no action as cell entries do all the nroff formatting return blackfriday.GoToNext + case blackfriday.TableCell: + r.handleTableCell(w, node, entering) + case blackfriday.HTMLSpan: + // ignore other HTML tags + case blackfriday.HTMLBlock: + if bytes.HasPrefix(node.Literal, []byte("