-
Notifications
You must be signed in to change notification settings - Fork 7
/
logs.go
53 lines (43 loc) · 979 Bytes
/
logs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package command
import (
"os"
"github.com/jessevdk/go-flags"
"github.com/mitchellh/cli"
)
//LogsOpts describes command options
type LogsOpts struct {
NerdOpts
}
//Logs command
type Logs struct {
*command
opts *LogsOpts
parser *flags.Parser
}
//LogsFactory returns a factory method for the join command
func LogsFactory() func() (cmd cli.Command, err error) {
cmd := &Logs{
command: &command{
help: "",
synopsis: "Retrieve up-to-date feedback from a task.",
parser: flags.NewNamedParser("nerd logs <task-ID>", flags.Default),
ui: &cli.BasicUi{
Reader: os.Stdin,
Writer: os.Stderr,
},
},
opts: &LogsOpts{},
}
cmd.runFunc = cmd.DoRun
_, err := cmd.command.parser.AddGroup("options", "options", cmd.opts)
if err != nil {
panic(err)
}
return func() (cli.Command, error) {
return cmd, nil
}
}
//DoRun is called by run and allows an error to be returned
func (cmd *Logs) DoRun(args []string) (err error) {
return nil
}