github.com/hernad/nomad@v1.6.112/command/recommendation.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package command
     5  
     6  import (
     7  	"strings"
     8  
     9  	"github.com/mitchellh/cli"
    10  )
    11  
    12  // Ensure RecommendationCommand satisfies the cli.Command interface.
    13  var _ cli.Command = &RecommendationCommand{}
    14  
    15  // RecommendationCommand implements cli.Command.
    16  type RecommendationCommand struct {
    17  	Meta
    18  }
    19  
    20  // Help satisfies the cli.Command Help function.
    21  func (r *RecommendationCommand) Help() string {
    22  	helpText := `
    23  Usage: nomad recommendation <subcommand> [options]
    24  
    25    This command groups subcommands for interacting with the recommendation API.
    26  
    27    Please see the individual subcommand help for detailed usage information.
    28  `
    29  	return strings.TrimSpace(helpText)
    30  }
    31  
    32  // Synopsis satisfies the cli.Command Synopsis function.
    33  func (r *RecommendationCommand) Synopsis() string {
    34  	return "Interact with the Nomad recommendation endpoint"
    35  }
    36  
    37  // Name returns the name of this command.
    38  func (r *RecommendationCommand) Name() string { return "recommendation" }
    39  
    40  // Run satisfies the cli.Command Run function.
    41  func (r *RecommendationCommand) Run(_ []string) int { return cli.RunResultHelp }