Skip to content

Commit

Permalink
alias nsc extend.
Browse files Browse the repository at this point in the history
  • Loading branch information
hugosantos committed Jul 14, 2024
1 parent d03e25a commit c99423b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmd/nsc/cmd/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func RegisterCommands(root *cobra.Command) {

root.AddCommand(cluster.NewBareClusterCmd("instance", false))
root.AddCommand(cluster.NewBareClusterCmd("cluster", true)) // backwards compatibility
root.AddCommand(cluster.NewExtendDurationCmd("extend")) // nsc extend
root.AddCommand(cluster.NewKubectlCmd()) // nsc kubectl
root.AddCommand(cluster.NewKubeconfigCmd()) // nsc kubeconfig write
root.AddCommand(cluster.NewBuildkitCmd()) // nsc buildkit
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/cmd/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func NewBareClusterCmd(use string, hidden bool) *cobra.Command {
cmd.AddCommand(NewProxyCmd())
cmd.AddCommand(newDockerLoginCmd(true)) // Adding hidden command under `cluster` to support old action versions.
cmd.AddCommand(NewMetadataCmd())
cmd.AddCommand(newExtendDurationCmd())
cmd.AddCommand(NewExtendDurationCmd("extend-duration"))

h := &cobra.Command{
Use: "internal",
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/cmd/cluster/extendduration.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import (
"namespacelabs.dev/foundation/internal/providers/nscloud/api"
)

func newExtendDurationCmd() *cobra.Command {
func NewExtendDurationCmd(name string) *cobra.Command {
cmd := &cobra.Command{
Use: "extend-duration [instance-id]",
Use: name + " [instance-id]",
Short: "Extends the duration of a instance.",
Args: cobra.MaximumNArgs(1),
}
Expand Down

0 comments on commit c99423b

Please sign in to comment.