/
job.go
37 lines (29 loc) · 1008 Bytes
/
job.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
package cmd
import (
flags "github.com/jessevdk/go-flags"
"github.com/mitchellh/cli"
)
//Job command
type Job struct {
*command
}
//JobFactory creates the command
func JobFactory(ui cli.Ui) cli.CommandFactory {
cmd := &Job{}
cmd.command = createCommand(ui, cmd.Execute, cmd.Description, cmd.Usage, cmd, nil, flags.None, "nerd job")
return func() (cli.Command, error) {
return cmd, nil
}
}
//Execute runs the command
func (cmd *Job) Execute(args []string) (err error) { return errShowHelp("") }
// Description returns long-form help text
func (cmd *Job) Description() string {
return "Group of commands used to manage the lifecycle of jobs. A job is a computation that takes some input data, runs an application to do operations on this data and stores the results."
}
// Synopsis returns a one-line
func (cmd *Job) Synopsis() string {
return "Group of commands used to manage the lifecycle of jobs."
}
// Usage shows usage
func (cmd *Job) Usage() string { return "nerd job <subcommand>" }