From 14b5cfeb9b524fb74794b4e477d87e9ca8421591 Mon Sep 17 00:00:00 2001 From: Will Roden Date: Sat, 24 Apr 2021 11:16:01 -0500 Subject: [PATCH] update kong and get rid of internal helpprinter --- README.md | 96 +++++---- cmd/benchdiff/benchdiff.go | 8 +- .../internal/helpprinter/guesswidth.go | 9 - .../internal/helpprinter/guesswidth_unix.go | 41 ---- .../internal/helpprinter/helpprinter.go | 156 -------------- .../helpprinter/helpprinter_copied.go | 197 ------------------ .../internal/helpprinter/helpprinter_test.go | 172 --------------- go.mod | 3 +- go.sum | 4 + 9 files changed, 59 insertions(+), 627 deletions(-) delete mode 100644 cmd/benchdiff/internal/helpprinter/guesswidth.go delete mode 100644 cmd/benchdiff/internal/helpprinter/guesswidth_unix.go delete mode 100644 cmd/benchdiff/internal/helpprinter/helpprinter.go delete mode 100644 cmd/benchdiff/internal/helpprinter/helpprinter_copied.go delete mode 100644 cmd/benchdiff/internal/helpprinter/helpprinter_test.go diff --git a/README.md b/README.md index 80098db..09ea6d6 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,8 @@ It essentially combines multiple `git`, `go test -bench` and `benchstat` command These are the basic steps `benchdiff` performs: - Runs `go test -bench ...` on your current worktree and saves the results to a cache directory. -- Creates a git stash with the current state of your worktree -- Switches to the base ref (usually "HEAD" or "master"). -- Runs `go test -bench ...` and saves the results to cache again. -- Switches back to the original git HEAD and restores the state from stash +- Creates a new worktree at the base ref +- Runs `go test -bench ...` on the base worktree and saves the results to cache again. - Runs `benchstat` to compare the base and head results from cache. ## GitHub Action @@ -42,51 +40,51 @@ Flags: --version Output the benchdiff version and exit. --debug write verbose output to stderr - --base-ref="HEAD" The git ref to be used as a baseline. - --cooldown=100ms How long to pause for cooldown between head and base runs. - --force-base Rerun benchmarks on the base reference even if the output already exists. - --git-cmd="git" The executable to use for git commands. - --json Format output as JSON. - --on-degrade=0 Exit code when there is a statistically significant degradation in the - results. - --tolerance=10.0 The minimum percent change before a result is considered degraded. - - benchmark command line: - --bench="." Run only those benchmarks matching a regular expression. To run all - benchmarks, use '--bench .'. - --benchmark-args=args Override the default args to the go command. This may be a template. - See https://github.com/willabides/benchdiff for details." - --benchmark-cmd="go" The command to use for benchmarks. - --benchmem Memory allocation statistics for benchmarks. - --benchtime=STRING Run enough iterations of each benchmark to take t, specified as a - time.Duration (for example, --benchtime 1h30s). The default is 1 - second (1s). The special syntax Nx means to run the benchmark N times - (for example, -benchtime 100x). - --count=10 Run each benchmark n times. If --cpu is set, run n times for each - GOMAXPROCS value.' - --cpu=GOMAXPROCS,... Specify a list of GOMAXPROCS values for which the benchmarks should - be executed. The default is the current value of GOMAXPROCS. - --packages="./..." Run benchmarks in these packages. - --show-bench-cmdline Instead of running benchmarks, output the command that would be used - and exit. - --tags=STRING Set the -tags flag on the go test command - --warmup-count=INT Run benchmarks with -count=n as a warmup - --warmup-time=STRING When warmups are run, set -benchtime=n - - benchstat options: - --alpha=0.05 consider change significant if p < α - --benchstat-output="text" format for benchstat output (csv,html,markdown or text) - --delta-test="utest" significance test to apply to delta: utest, ttest, or none - --geomean print the geometric mean of each file - --norange suppress range columns (CSV and markdown only) - --reverse-sort reverse sort order - --sort="none" sort by order: delta, name, none - --split="pkg,goos,goarch" split benchmarks by labels - - benchmark result cache: - --cache-dir=STRING Override the default directory where benchmark output is kept. - --clear-cache Remove benchdiff files from the cache dir. - --show-cache-dir Output the cache dir and exit. + --base-ref="HEAD" The git ref to be used as a baseline. + --cooldown=100ms How long to pause for cooldown between head and base runs. + --force-base Rerun benchmarks on the base reference even if the output already exists. + --git-cmd="git" The executable to use for git commands. + --json Format output as JSON. + --on-degrade=0 Exit code when there is a statistically significant degradation in the + results. + --tolerance=10.0 The minimum percent change before a result is considered degraded. + +benchmark command line + --bench="." Run only those benchmarks matching a regular expression. To run all + benchmarks, use '--bench .'. + --benchmark-args=args Override the default args to the go command. This may be a template. See + https://github.com/willabides/benchdiff for details." + --benchmark-cmd="go" The command to use for benchmarks. + --benchmem Memory allocation statistics for benchmarks. + --benchtime=STRING Run enough iterations of each benchmark to take t, specified as a + time.Duration (for example, --benchtime 1h30s). The default is 1 second + (1s). The special syntax Nx means to run the benchmark N times (for + example, -benchtime 100x). + --count=10 Run each benchmark n times. If --cpu is set, run n times for each + GOMAXPROCS value.' + --cpu=GOMAXPROCS,... Specify a list of GOMAXPROCS values for which the benchmarks should be + executed. The default is the current value of GOMAXPROCS. + --packages="./..." Run benchmarks in these packages. + --show-bench-cmdline Instead of running benchmarks, output the command that would be used and + exit. + --tags=STRING Set the -tags flag on the go test command + --warmup-count=INT Run benchmarks with -count=n as a warmup + --warmup-time=STRING When warmups are run, set -benchtime=n + +benchstat options + --alpha=0.05 consider change significant if p < α + --benchstat-output="text" format for benchstat output (csv,html,markdown or text) + --delta-test="utest" significance test to apply to delta: utest, ttest, or none + --geomean print the geometric mean of each file + --norange suppress range columns (CSV and markdown only) + --reverse-sort reverse sort order + --sort="none" sort by order: delta, name, none + --split="pkg,goos,goarch" split benchmarks by labels + +benchmark result cache + --cache-dir=STRING Override the default directory where benchmark output is kept. + --clear-cache Remove benchdiff files from the cache dir. + --show-cache-dir Output the cache dir and exit. ``` diff --git a/cmd/benchdiff/benchdiff.go b/cmd/benchdiff/benchdiff.go index a196eac..dcd13b6 100644 --- a/cmd/benchdiff/benchdiff.go +++ b/cmd/benchdiff/benchdiff.go @@ -13,7 +13,6 @@ import ( "github.com/alecthomas/kong" "github.com/willabides/benchdiff/cmd/benchdiff/internal" - "github.com/willabides/benchdiff/cmd/benchdiff/internal/helpprinter" "github.com/willabides/benchdiff/pkg/benchstatter" "golang.org/x/perf/benchstat" ) @@ -243,8 +242,13 @@ func main() { benchVars["CacheDirDefault"] = filepath.Join(userCacheDir, "benchdiff") kctx := kong.Parse(&cli, benchstatVars, benchVars, groupHelp, - kong.Help(helpprinter.NewHelpPrinter(nil)), kong.Description(strings.TrimSpace(description)), + kong.ExplicitGroups([]kong.Group{ + {Key: "benchstat", Title: "benchstat options"}, + {Key: "cache", Title: "benchmark result cache"}, + {Key: "gotest", Title: "benchmark command line"}, + {Key: "x"}, + }), ) benchArgs, err := getBenchArgs() diff --git a/cmd/benchdiff/internal/helpprinter/guesswidth.go b/cmd/benchdiff/internal/helpprinter/guesswidth.go deleted file mode 100644 index 28bf445..0000000 --- a/cmd/benchdiff/internal/helpprinter/guesswidth.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd - -package helpprinter - -import "io" - -func guessWidth(w io.Writer) int { - return 80 -} diff --git a/cmd/benchdiff/internal/helpprinter/guesswidth_unix.go b/cmd/benchdiff/internal/helpprinter/guesswidth_unix.go deleted file mode 100644 index afdeebf..0000000 --- a/cmd/benchdiff/internal/helpprinter/guesswidth_unix.go +++ /dev/null @@ -1,41 +0,0 @@ -// +build !appengine,linux freebsd darwin dragonfly netbsd openbsd - -package helpprinter - -import ( - "io" - "os" - "strconv" - "syscall" - "unsafe" -) - -func guessWidth(w io.Writer) int { - // check if COLUMNS env is set to comply with - // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html - colsStr := os.Getenv("COLUMNS") - if colsStr != "" { - if cols, err := strconv.Atoi(colsStr); err == nil { - return cols - } - } - - if t, ok := w.(*os.File); ok { - fd := t.Fd() - var dimensions [4]uint16 - - if _, _, err := syscall.Syscall6( - syscall.SYS_IOCTL, - uintptr(fd), //nolint:unconvert // copied code - uintptr(syscall.TIOCGWINSZ), - uintptr(unsafe.Pointer(&dimensions)), //nolint:gas // copied code - 0, 0, 0, - ); err == 0 { - if dimensions[1] == 0 { - return 80 - } - return int(dimensions[1]) - } - } - return 80 -} diff --git a/cmd/benchdiff/internal/helpprinter/helpprinter.go b/cmd/benchdiff/internal/helpprinter/helpprinter.go deleted file mode 100644 index 5c13595..0000000 --- a/cmd/benchdiff/internal/helpprinter/helpprinter.go +++ /dev/null @@ -1,156 +0,0 @@ -package helpprinter - -import ( - "sort" - - "github.com/alecthomas/kong" -) - -// NewHelpPrinter returns a new kong.HelpPrinter -func NewHelpPrinter(helpValueFormatter kong.HelpValueFormatter) kong.HelpPrinter { - return func(options kong.HelpOptions, ctx *kong.Context) error { - if ctx.Empty() { - options.Summary = false - } - w := newHelpWriter(ctx, helpValueFormatter, options) - selected := ctx.Selected() - if selected == nil { - printApp(w, ctx.Model) - } else { - printCommand(w, ctx.Model, selected) - } - return w.Write(ctx.Stdout) - } -} - -func sortFlagsByGroup(flags []*kong.Flag) { - groupOrder := map[string]int{ - "": -1, - } - for i, flag := range flags { - _, ok := groupOrder[flag.Group] - if !ok { - groupOrder[flag.Group] = i - } - } - sort.SliceStable(flags, func(i, j int) bool { - return groupOrder[flags[i].Group] < groupOrder[flags[j].Group] - }) -} - -func groupFlagsByTag(flags []*kong.Flag) [][]*kong.Flag { - // make a copy so this doesn't have the side effect of sorting flags - fl := make([]*kong.Flag, len(flags)) - copy(fl, flags) - sortFlagsByGroup(fl) - - groups := [][]*kong.Flag{{}} - - for i, flag := range fl { - if i > 0 && fl[i-1].Group != flag.Group { - groups = append(groups, []*kong.Flag{}) - } - groups[len(groups)-1] = append(groups[len(groups)-1], flag) - } - - return groups -} - -// regroupFlags sorts each flag group by group tag then splits the group by group tag -func regroupFlags(flagGroups [][]*kong.Flag) [][]*kong.Flag { - result := make([][]*kong.Flag, 0, len(flagGroups)) - for _, group := range flagGroups { - result = append(result, groupFlagsByTag(group)...) - } - return result -} - -// Below here is modified code from https://github.com/alecthomas/kong/blob/d78d607800e2d9a4eb100a7b48021f17196babcb/help.go - -func newHelpWriter(ctx *kong.Context, helpFormatter kong.HelpValueFormatter, options kong.HelpOptions) *helpWriter { - if helpFormatter == nil { - helpFormatter = kong.DefaultHelpValueFormatter - } - lines := []string{} - w := &helpWriter{ - indent: "", - width: guessWidth(ctx.Stdout), - lines: &lines, - helpFormatter: helpFormatter, - HelpOptions: options, - } - return w -} - -func printNodeDetail(w *helpWriter, node *kong.Node, hide bool) { - if node.Help != "" { - w.Print("") - w.Wrap(node.Help) - } - if w.Summary { - return - } - if node.Detail != "" { - w.Print("") - w.Wrap(node.Detail) - } - if len(node.Positional) > 0 { - w.Print("") - w.Print("Arguments:") - writePositionals(w.Indent(), node.Positional) - } - if flags := node.AllFlags(true); len(flags) > 0 { - flags = regroupFlags(flags) - w.Print("") - w.Print("Flags:") - writeFlags(w.Indent(), node.Vars(), flags) - } - - cmds := node.Leaves(hide) - if len(cmds) > 0 { - w.Print("") - w.Print("Commands:") - if w.Tree { - writeCommandTree(w, node) - } else { - iw := w.Indent() - if w.Compact { - writeCompactCommandList(cmds, iw) - } else { - writeCommandList(cmds, iw) - } - } - } -} - -func writeFlags(w *helpWriter, vars kong.Vars, groups [][]*kong.Flag) { - haveShort := false - for _, group := range groups { - for _, flag := range group { - if flag.Short != 0 { - haveShort = true - break - } - } - } - for i, group := range groups { - rows := [][2]string{} - groupHelp := "" - if len(group) > 0 && group[0].Group != "" { - groupHelp = vars[group[0].Group+"GroupHelp"] - } - if i > 0 || groupHelp != "" { - w.Print("") - } - if groupHelp != "" { - w.Print(groupHelp) - } - - for _, flag := range group { - if !flag.Hidden { - rows = append(rows, [2]string{formatFlag(haveShort, flag), w.helpFormatter(flag.Value)}) - } - } - writeTwoColumns(w, rows) - } -} diff --git a/cmd/benchdiff/internal/helpprinter/helpprinter_copied.go b/cmd/benchdiff/internal/helpprinter/helpprinter_copied.go deleted file mode 100644 index c9c8b6f..0000000 --- a/cmd/benchdiff/internal/helpprinter/helpprinter_copied.go +++ /dev/null @@ -1,197 +0,0 @@ -package helpprinter - -import ( - "bytes" - "fmt" - "go/doc" - "io" - "strings" - - . "github.com/alecthomas/kong" //nolint:golint // dot import is so I can copy code verbatim -) - -// Everything below here is copied verbatim from -// https://github.com/alecthomas/kong/blob/d78d607800e2d9a4eb100a7b48021f17196babcb/help.go -// -// The only modifications are from gofumpt -// -// Unneeded code and modified functions are moved to helpprinter.go - -const ( - defaultIndent = 2 - defaultColumnPadding = 4 -) - -func printApp(w *helpWriter, app *Application) { - if !w.NoAppSummary { - w.Printf("Usage: %s%s", app.Name, app.Summary()) - } - printNodeDetail(w, app.Node, true) - cmds := app.Leaves(true) - if len(cmds) > 0 && app.HelpFlag != nil { - w.Print("") - if w.Summary { - w.Printf(`Run "%s --help" for more information.`, app.Name) - } else { - w.Printf(`Run "%s --help" for more information on a command.`, app.Name) - } - } -} - -func printCommand(w *helpWriter, app *Application, cmd *Command) { - if !w.NoAppSummary { - w.Printf("Usage: %s %s", app.Name, cmd.Summary()) - } - printNodeDetail(w, cmd, true) - if w.Summary && app.HelpFlag != nil { - w.Print("") - w.Printf(`Run "%s --help" for more information.`, cmd.FullPath()) - } -} - -func writeCommandList(cmds []*Node, iw *helpWriter) { - for i, cmd := range cmds { - if cmd.Hidden { - continue - } - printCommandSummary(iw, cmd) - if i != len(cmds)-1 { - iw.Print("") - } - } -} - -func writeCompactCommandList(cmds []*Node, iw *helpWriter) { - rows := [][2]string{} - for _, cmd := range cmds { - if cmd.Hidden { - continue - } - rows = append(rows, [2]string{cmd.Path(), cmd.Help}) - } - writeTwoColumns(iw, rows) -} - -func writeCommandTree(w *helpWriter, node *Node) { - iw := w.Indent() - rows := make([][2]string, 0, len(node.Children)*2) - for i, cmd := range node.Children { - if cmd.Hidden { - continue - } - rows = append(rows, w.CommandTree(cmd, "")...) - if i != len(node.Children)-1 { - rows = append(rows, [2]string{"", ""}) - } - } - writeTwoColumns(iw, rows) -} - -func printCommandSummary(w *helpWriter, cmd *Command) { - w.Print(cmd.Summary()) - if cmd.Help != "" { - w.Indent().Wrap(cmd.Help) - } -} - -type helpWriter struct { - indent string - width int - lines *[]string - helpFormatter HelpValueFormatter - HelpOptions -} - -func (h *helpWriter) Printf(format string, args ...interface{}) { - h.Print(fmt.Sprintf(format, args...)) -} - -func (h *helpWriter) Print(text string) { - *h.lines = append(*h.lines, strings.TrimRight(h.indent+text, " ")) -} - -func (h *helpWriter) Indent() *helpWriter { - return &helpWriter{indent: h.indent + " ", lines: h.lines, width: h.width - 2, HelpOptions: h.HelpOptions, helpFormatter: h.helpFormatter} -} - -func (h *helpWriter) String() string { - return strings.Join(*h.lines, "\n") -} - -func (h *helpWriter) Write(w io.Writer) error { - for _, line := range *h.lines { - _, err := io.WriteString(w, line+"\n") - if err != nil { - return err - } - } - return nil -} - -func (h *helpWriter) Wrap(text string) { - w := bytes.NewBuffer(nil) - doc.ToText(w, strings.TrimSpace(text), "", " ", h.width) - for _, line := range strings.Split(strings.TrimSpace(w.String()), "\n") { - h.Print(line) - } -} - -func writePositionals(w *helpWriter, args []*Positional) { - rows := [][2]string{} - for _, arg := range args { - rows = append(rows, [2]string{arg.Summary(), w.helpFormatter(arg)}) - } - writeTwoColumns(w, rows) -} - -func writeTwoColumns(w *helpWriter, rows [][2]string) { - maxLeft := 375 * w.width / 1000 - if maxLeft < 30 { - maxLeft = 30 - } - // Find size of first column. - leftSize := 0 - for _, row := range rows { - if c := len(row[0]); c > leftSize && c < maxLeft { - leftSize = c - } - } - - offsetStr := strings.Repeat(" ", leftSize+defaultColumnPadding) - - for _, row := range rows { - buf := bytes.NewBuffer(nil) - doc.ToText(buf, row[1], "", strings.Repeat(" ", defaultIndent), w.width-leftSize-defaultColumnPadding) - lines := strings.Split(strings.TrimRight(buf.String(), "\n"), "\n") - - line := fmt.Sprintf("%-*s", leftSize, row[0]) - if len(row[0]) < maxLeft { - line += fmt.Sprintf("%*s%s", defaultColumnPadding, "", lines[0]) - lines = lines[1:] - } - w.Print(line) - for _, line := range lines { - w.Printf("%s%s", offsetStr, line) - } - } -} - -// haveShort will be true if there are short flags present at all in the help. Useful for column alignment. -func formatFlag(haveShort bool, flag *Flag) string { - flagString := "" - name := flag.Name - isBool := flag.IsBool() - if flag.Short != 0 { - flagString += fmt.Sprintf("-%c, --%s", flag.Short, name) - } else { - if haveShort { - flagString += fmt.Sprintf(" --%s", name) - } else { - flagString += fmt.Sprintf("--%s", name) - } - } - if !isBool { - flagString += fmt.Sprintf("=%s", flag.FormatPlaceHolder()) - } - return flagString -} diff --git a/cmd/benchdiff/internal/helpprinter/helpprinter_test.go b/cmd/benchdiff/internal/helpprinter/helpprinter_test.go deleted file mode 100644 index 2b0acca..0000000 --- a/cmd/benchdiff/internal/helpprinter/helpprinter_test.go +++ /dev/null @@ -1,172 +0,0 @@ -package helpprinter - -import ( - "bytes" - "strings" - "testing" - - "github.com/alecthomas/kong" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func flagsFromGroupTags(tags []string) []*kong.Flag { - flags := make([]*kong.Flag, len(tags)) - for i, tag := range tags { - flags[i] = &kong.Flag{ - Group: tag, - Value: &kong.Value{ - Position: i, - }, - } - } - return flags -} - -func assertFlagOrder(t *testing.T, wantOrder []int, flags []*kong.Flag) bool { - t.Helper() - got := make([]int, len(flags)) - for i, flag := range flags { - got[i] = flag.Value.Position - } - if wantOrder == nil { - wantOrder = []int{} - } - return assert.Equal(t, wantOrder, got) -} - -func Test_groupFlagsByTag(t *testing.T) { - for _, td := range []struct { - name string - flagGroupTags []string - want [][]int - }{ - { - name: "empty", - want: [][]int{{}}, - }, - { - name: "no tags", - flagGroupTags: []string{"", "", ""}, - want: [][]int{{0, 1, 2}}, - }, - { - name: "empty goes first", - flagGroupTags: []string{"a", "", "a"}, - want: [][]int{{1}, {0, 2}}, - }, - { - name: "multiple groups", - flagGroupTags: []string{"a", "", "a", "b", "b", "a"}, - want: [][]int{{1}, {0, 2, 5}, {3, 4}}, - }, - { - name: "no empty", - flagGroupTags: []string{"a", "a", "b", "b", "a"}, - want: [][]int{{0, 1, 4}, {2, 3}}, - }, - { - name: "space isn't empty", - flagGroupTags: []string{"a", "a", "b", " ", "a"}, - want: [][]int{{0, 1, 4}, {2}, {3}}, - }, - } { - t.Run(td.name, func(t *testing.T) { - flags := flagsFromGroupTags(td.flagGroupTags) - got := groupFlagsByTag(flags) - assert.Len(t, got, len(td.want)) - for i := range td.want { - assertFlagOrder(t, td.want[i], got[i]) - } - }) - } -} - -func Test_sortFlagsByGroup(t *testing.T) { - for _, td := range []struct { - name string - flagGroupTags []string - wantOrder []int - }{ - { - name: "empty", - }, - { - name: "no tags", - flagGroupTags: []string{"", "", ""}, - wantOrder: []int{0, 1, 2}, - }, - { - name: "empty goes first", - flagGroupTags: []string{"a", "", "a"}, - wantOrder: []int{1, 0, 2}, - }, - { - name: "multiple groups", - flagGroupTags: []string{"a", "", "a", "b", "b", "a"}, - wantOrder: []int{1, 0, 2, 5, 3, 4}, - }, - { - name: "no empty", - flagGroupTags: []string{"a", "a", "b", "b", "a"}, - wantOrder: []int{0, 1, 4, 2, 3}, - }, - { - name: "space isn't empty", - flagGroupTags: []string{"a", "a", "b", " ", "a"}, - wantOrder: []int{0, 1, 4, 2, 3}, - }, - } { - t.Run(td.name, func(t *testing.T) { - flags := flagsFromGroupTags(td.flagGroupTags) - sortFlagsByGroup(flags) - assertFlagOrder(t, td.wantOrder, flags) - }) - } -} - -func TestNewHelpPrinter(t *testing.T) { - var cli struct { - A string `kong:"help='this is a'"` - B string `kong:"group=x,help='this is b'"` - C string `kong:"group=y,help='this is c'"` - D []int64 `kong:"group=x,help='this is d'"` - E string `kong:"group=z,help='this is e',short=E"` - } - - var buf bytes.Buffer - k, err := kong.New(&cli, - kong.Writers(&buf, nil), - kong.Name("appname"), - kong.Vars{ - "xGroupHelp": `group x is like this`, - "zGroupHelp": `group z is like this`, - }, - ) - require.NoError(t, err) - kctx, err := kong.Trace(k, nil) - require.NoError(t, err) - - printer := NewHelpPrinter(nil) - err = printer(kong.HelpOptions{}, kctx) - require.NoError(t, err) - - want := ` -Usage: appname - -Flags: - -h, --help Show context-sensitive help. - --a=STRING this is a - - group x is like this - --b=STRING this is b - --d=D,... this is d - - --c=STRING this is c - - group z is like this - -E, --e=STRING this is e -` - - require.Equal(t, strings.TrimSpace(want), strings.TrimSpace(buf.String())) -} diff --git a/go.mod b/go.mod index d7eca18..797ab52 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,8 @@ module github.com/willabides/benchdiff go 1.15 require ( - github.com/alecthomas/kong v0.2.12 + github.com/alecthomas/kong v0.2.16 + github.com/pkg/errors v0.9.1 // indirect github.com/stretchr/testify v1.5.1 github.com/willabides/mdtable v0.3.1 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 diff --git a/go.sum b/go.sum index 6f8be9c..d56288e 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vc github.com/aclements/go-moremath v0.0.0-20161014184102-0ff62e0875ff/go.mod h1:idZL3yvz4kzx1dsBOAC+oYv6L92P1oFEhUXUB1A/lwQ= github.com/alecthomas/kong v0.2.12 h1:X3kkCOXGUNzLmiu+nQtoxWqj4U2a39MpSJR3QdQXOwI= github.com/alecthomas/kong v0.2.12/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= +github.com/alecthomas/kong v0.2.16 h1:F232CiYSn54Tnl1sJGTeHmx4vJDNLVP2b9yCVMOQwHQ= +github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 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= @@ -21,6 +23,8 @@ github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=