woops
This commit is contained in:
parent
0cc82e4f87
commit
762c54cd0d
2 changed files with 33 additions and 0 deletions
5
cmd/jkl/command_interface.go
Normal file
5
cmd/jkl/command_interface.go
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
type Runner interface {
|
||||||
|
Run() error
|
||||||
|
}
|
||||||
28
cmd/jkl/editcomment.go
Normal file
28
cmd/jkl/editcomment.go
Normal file
|
|
@ -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")
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue