Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 9596c44

Browse files
author
Russtopia
committed
Added proposed edit cmd as synonym for create
1 parent 99468a5 commit 9596c44

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cmd/coder/urls.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ type createSubCmd struct {
5858
access string
5959
urlname string
6060
}
61+
type editSubCmd struct {
62+
createSubCmd
63+
}
64+
65+
func (sub *editSubCmd) Spec() cli.CommandSpec {
66+
return cli.CommandSpec{
67+
Name: "edit",
68+
Usage: "<env name> <port> [--access <level>] [--name <name>]",
69+
Desc: "create/update a devurl for external access",
70+
}
71+
}
6172

6273
func (sub *createSubCmd) RegisterFlags(fl *pflag.FlagSet) {
6374
fl.StringVarP(&sub.access, "access", "a", "private", "[private | org | authed | public] set devurl access")
@@ -231,6 +242,7 @@ func (cmd urlsCmd) Run(fl *pflag.FlagSet) {
231242
func (cmd *urlsCmd) Subcommands() []cli.Command {
232243
return []cli.Command{
233244
&createSubCmd{},
245+
&editSubCmd{},
234246
&delSubCmd{},
235247
}
236248
}

0 commit comments

Comments
 (0)