-
Notifications
You must be signed in to change notification settings - Fork 13
/
prepare.go
48 lines (39 loc) · 971 Bytes
/
prepare.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
package cmdtree
import (
"github.com/ActiveState/cli/internal/captain"
"github.com/ActiveState/cli/internal/locale"
"github.com/ActiveState/cli/internal/primer"
"github.com/ActiveState/cli/internal/runners/prepare"
)
func newPrepareCommand(prime *primer.Values) *captain.Command {
runner := prepare.New(prime)
cmd := captain.NewCommand(
"_prepare",
"",
locale.Tl("prepare_description", "Prepare environment for use with the State Tool."),
prime,
[]*captain.Flag{},
[]*captain.Argument{},
func(c *captain.Command, _ []string) error {
return runner.Run(c)
},
)
cmd.SetHidden(true)
return cmd
}
func newPrepareCompletionsCommand(prime *primer.Values) *captain.Command {
runner := prepare.NewCompletions(prime)
cmd := captain.NewCommand(
"completions",
"",
"",
prime,
[]*captain.Flag{},
[]*captain.Argument{},
func(c *captain.Command, _ []string) error {
return runner.Run(c)
},
)
cmd.SetHidden(true)
return cmd
}