Files
threshold/internal/cmd/commands/unsupported/unsupported.go
T
429247f407 [COMPLIANCE] Update Copyright Headers (#6282)
* [COMPLIANCE] Update Copyright and License Headers

* chore: make gen to generate files with copyright headers

* chore: update missed copyright headers

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Justin Nguyen <justin.nguyen@hashicorp.com>
2026-01-28 11:05:07 -06:00

39 lines
870 B
Go

// Copyright IBM Corp. 2020, 2025
// SPDX-License-Identifier: BUSL-1.1
package unsupported
import (
"errors"
"fmt"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/mitchellh/cli"
)
var _ cli.Command = (*UnsupportedCommand)(nil)
// UnsupportedCommand is a command that simply prints out a message indicating
// the requested command is not supported on this platform.
type UnsupportedCommand struct {
*base.Command
CommandName string
}
func (c *UnsupportedCommand) notice() string {
return fmt.Sprintf("'boundary %s' is not supported on this platform.", c.CommandName)
}
func (c *UnsupportedCommand) Synopsis() string {
return c.notice()
}
func (c *UnsupportedCommand) Help() string {
return c.notice()
}
func (c *UnsupportedCommand) Run(args []string) int {
c.Command.PrintCliError(errors.New(c.notice()))
return base.CommandUserError
}