Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Group subcommands for cognitive ease#1351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 1 commit intomainfromseparatecmd
May 9, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletionscli/autostart.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,11 +18,12 @@ The default schedule is at 09:00 in your local timezone (TZ env, UTC by default)

func autostart() *cobra.Command {
autostartCmd := &cobra.Command{
Use: "autostart enable <workspace>",
Short: "schedule a workspace to automatically start at a regular time",
Long: autostartDescriptionLong,
Example: "coder autostart enable my-workspace --minute 30 --hour 9 --days 1-5 --tz Europe/Dublin",
Hidden: true,
Annotations: workspaceCommand,
Use: "autostart enable <workspace>",
Short: "schedule a workspace to automatically start at a regular time",
Long: autostartDescriptionLong,
Example: "coder autostart enable my-workspace --minute 30 --hour 9 --days 1-5 --tz Europe/Dublin",
Hidden: true,
}

autostartCmd.AddCommand(autostartEnable())
Expand Down
4 changes: 3 additions & 1 deletioncli/configssh.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,9 @@ func configSSH() *cobra.Command {
skipProxyCommandbool
)
cmd:=&cobra.Command{
Use:"config-ssh",
Annotations:workspaceCommand,
Use:"config-ssh",
Short:"Populate your SSH config with Host entries for all of your workspaces",
RunE:func(cmd*cobra.Command,args []string)error {
client,err:=createClient(cmd)
iferr!=nil {
Expand Down
5 changes: 3 additions & 2 deletionscli/create.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,9 @@ func create() *cobra.Command {
templateNamestring
)
cmd:=&cobra.Command{
Use:"create [name]",
Short:"Create a workspace from a template",
Annotations:workspaceCommand,
Use:"create [name]",
Short:"Create a workspace from a template",
RunE:func(cmd*cobra.Command,args []string)error {
client,err:=createClient(cmd)
iferr!=nil {
Expand Down
8 changes: 5 additions & 3 deletionscli/delete.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,9 +13,11 @@ import (
// nolint
funcdelete()*cobra.Command {
return&cobra.Command{
Use:"delete <workspace>",
Aliases: []string{"rm"},
Args:cobra.ExactArgs(1),
Annotations:workspaceCommand,
Use:"delete <workspace>",
Short:"Delete a workspace",
Aliases: []string{"rm"},
Args:cobra.ExactArgs(1),
RunE:func(cmd*cobra.Command,args []string)error {
client,err:=createClient(cmd)
iferr!=nil {
Expand Down
6 changes: 4 additions & 2 deletionscli/list.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,8 +13,10 @@ import (

funclist()*cobra.Command {
return&cobra.Command{
Use:"list",
Aliases: []string{"ls"},
Annotations:workspaceCommand,
Use:"list",
Short:"List all workspaces",
Aliases: []string{"ls"},
RunE:func(cmd*cobra.Command,args []string)error {
client,err:=createClient(cmd)
iferr!=nil {
Expand Down
5 changes: 3 additions & 2 deletionscli/login.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,8 +37,9 @@ func init() {

funclogin()*cobra.Command {
return&cobra.Command{
Use:"login <url>",
Args:cobra.ExactArgs(1),
Use:"login <url>",
Short:"Authenticate with a Coder deployment",
Args:cobra.ExactArgs(1),
RunE:func(cmd*cobra.Command,args []string)error {
rawURL:=args[0]

Expand Down
75 changes: 0 additions & 75 deletionscli/parametercreate.go
View file
Open in desktop

This file was deleted.

13 changes: 0 additions & 13 deletionscli/parameterdelete.go
View file
Open in desktop

This file was deleted.

50 changes: 0 additions & 50 deletionscli/parameterlist.go
View file
Open in desktop

This file was deleted.

78 changes: 0 additions & 78 deletionscli/parameters.go
View file
Open in desktop

This file was deleted.

1 change: 1 addition & 0 deletionscli/publickey.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@ func publickey() *cobra.Command {
return&cobra.Command{
Use:"publickey",
Aliases: []string{"pubkey"},
Short:"Output your public key for Git operations",
RunE:func(cmd*cobra.Command,args []string)error {
client,err:=createClient(cmd)
iferr!=nil {
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp