diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-27 17:23:56 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-12-27 17:23:56 +0100 |
commit | d5b07f48376cef9f62e12e3b56bcdd7483ef588f (patch) | |
tree | 2eaf6c403e0f6e8bf1fd1327afd275a226d93f1f /commands/bug/bug_new.go | |
parent | 4c7043e8ed994d7863cfd706f6cfd2e1f91850df (diff) | |
download | git-bug-d5b07f48376cef9f62e12e3b56bcdd7483ef588f.tar.gz |
commands: move bug specific input code into commands/bug/input
Diffstat (limited to 'commands/bug/bug_new.go')
-rw-r--r-- | commands/bug/bug_new.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/bug/bug_new.go b/commands/bug/bug_new.go index fbfb9def..9ef288e9 100644 --- a/commands/bug/bug_new.go +++ b/commands/bug/bug_new.go @@ -3,8 +3,8 @@ package bugcmd import ( "github.com/spf13/cobra" + buginput "github.com/MichaelMure/git-bug/commands/bug/input" "github.com/MichaelMure/git-bug/commands/execenv" - "github.com/MichaelMure/git-bug/commands/input" "github.com/MichaelMure/git-bug/util/text" ) @@ -45,16 +45,16 @@ func newBugNewCommand() *cobra.Command { func runBugNew(env *execenv.Env, opts bugNewOptions) error { var err error if opts.messageFile != "" && opts.message == "" { - opts.title, opts.message, err = input.BugCreateFileInput(opts.messageFile) + opts.title, opts.message, err = buginput.BugCreateFileInput(opts.messageFile) if err != nil { return err } } if !opts.nonInteractive && opts.messageFile == "" && (opts.message == "" || opts.title == "") { - opts.title, opts.message, err = input.BugCreateEditorInput(env.Backend, opts.title, opts.message) + opts.title, opts.message, err = buginput.BugCreateEditorInput(env.Backend, opts.title, opts.message) - if err == input.ErrEmptyTitle { + if err == buginput.ErrEmptyTitle { env.Out.Println("Empty title, aborting.") return nil } |