/
recommendation.go
38 lines (28 loc) · 1.03 KB
/
recommendation.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
package command
import (
"strings"
"github.com/mitchellh/cli"
)
// Ensure RecommendationCommand satisfies the cli.Command interface.
var _ cli.Command = &RecommendationCommand{}
// RecommendationCommand implements cli.Command.
type RecommendationCommand struct {
Meta
}
// Help satisfies the cli.Command Help function.
func (r *RecommendationCommand) Help() string {
helpText := `
Usage: nomad recommendation <subcommand> [options]
This command groups subcommands for interacting with the recommendation API.
Please see the individual subcommand help for detailed usage information.
`
return strings.TrimSpace(helpText)
}
// Synopsis satisfies the cli.Command Synopsis function.
func (r *RecommendationCommand) Synopsis() string {
return "Interact with the Nomad recommendation endpoint"
}
// Name returns the name of this command.
func (r *RecommendationCommand) Name() string { return "recommendation" }
// Run satisfies the cli.Command Run function.
func (r *RecommendationCommand) Run(_ []string) int { return cli.RunResultHelp }