diff --git a/cmd/jkl/command_interface.go b/cmd/jkl/command_interface.go new file mode 100644 index 0000000..9602702 --- /dev/null +++ b/cmd/jkl/command_interface.go @@ -0,0 +1,5 @@ +package main + +type Runner interface { + Run() error +} diff --git a/cmd/jkl/editcomment.go b/cmd/jkl/editcomment.go new file mode 100644 index 0000000..0ed1dc8 --- /dev/null +++ b/cmd/jkl/editcomment.go @@ -0,0 +1,28 @@ +package main + +import ( + "errors" + "flag" +) + +type EditCommentCmd struct { + args []string + file string + issueKey string +} + +func NewEditCommentCmd(args []string) (*EditCommentCmd, error) { + ccmd := &EditCommentCmd{} + f := flag.NewFlagSet("comments", flag.ExitOnError) + f.StringVar(&ccmd.file, "f", "", "File to get issue comment from") + f.Parse(args) + if len(f.Args()) < 1 { + return nil, ErrNotEnoughArgs + } + ccmd.issueKey = f.Arg(0) + return ccmd, nil +} + +func (e *EditCommentCmd) Run() error { + return errors.New("Not implemented") +}