Skip to content

Commit

Permalink
reusing shared code from sha1n/gommons (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
sha1n authored Sep 21, 2021
1 parent e0ab44d commit e377f1c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 35 deletions.
3 changes: 2 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/sha1n/bert/api"
"github.com/sha1n/bert/internal/cli"
"github.com/sha1n/bert/pkg/osutil"
"github.com/sha1n/gommons/pkg/cmd"
errorhandling "github.com/sha1n/gommons/pkg/error_handling"
"github.com/sha1n/termite"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -49,7 +50,7 @@ func doRun(exitFn func(int)) {

// Subcommands
rootCmd.AddCommand(cli.CreateConfigCommand(ctx))
rootCmd.AddCommand(cli.CreateCompletionCommand())
rootCmd.AddCommand(cmd.CreateShellCompletionScriptGenCommand())
if enableSelfUpdate() {
rootCmd.AddCommand(cli.CreateUpdateCommand(Version, ProgramName, ctx))
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/go-playground/universal-translator v0.18.0
github.com/go-playground/validator/v10 v10.9.0
github.com/montanaflynn/stats v0.6.6
github.com/sha1n/gommons v0.0.9
github.com/sha1n/gommons v0.0.10
github.com/sha1n/termite v0.0.19
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.2.1
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sha1n/gommons v0.0.9 h1:q8UXAuo1rkMDS7XtJU+hl6jyatSyQCZdJ4p91lvzzzA=
github.com/sha1n/gommons v0.0.9/go.mod h1:d9PBtenEZe6G9w1NftkbRpc2ISyJdw57wmnUKNT0wnM=
github.com/sha1n/gommons v0.0.10 h1:SUPfx0aSG+9Rhok1V+UevwpYhn9P0WI3Mm9GJPuM9kQ=
github.com/sha1n/gommons v0.0.10/go.mod h1:ioZhUOTBogxTZD57BVlxThZs4SIw8jS/nX9hgQ1lbn8=
github.com/sha1n/termite v0.0.19 h1:zx7Vdp6ZPbONLZ7+VcdLHTr5JkUmO1z0mMpURwkOwO8=
github.com/sha1n/termite v0.0.19/go.mod h1:wuukS1dnke28CUEgrlKXoLXdTXcjwTFl0Q4S9luPiuA=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
Expand Down
32 changes: 0 additions & 32 deletions internal/cli/completion.go

This file was deleted.

0 comments on commit e377f1c

Please sign in to comment.