-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
9596c44
to
3a9cfc4
Compare
3a9cfc4
to
fa8cbf7
Compare
In general: how do we feel about the The downside is that An alternative could be to add a flag to
Where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the create/edit subcommands, I'd prefer to either keep how you have it right now in the pr, or go back to having just create
. Personally, I like that it's idempotent(ish) and I'd find it annoying to have to call edit
in the case of me forgetting that a devurl already exists. I like my CLIs to just do what I mean.
ea7e23a
to
3ced5b2
Compare
3ced5b2
to
b4109bf
Compare
Sure. Since @fuskovic added an alias ability to the cli recently, I left in "edit", but one can just use |
b4109bf
to
5d92778
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add integration tests to ensure continued compatibility. #81 should be a good model.
7924bb3
to
cc55a4a
Compare
@@ -137,35 +223,27 @@ func (sub delSubCmd) Run(fl *pflag.FlagSet) { | |||
exitUsage(fl) | |||
} | |||
|
|||
if !portIsValid(port) { | |||
portNum, err := validatePort(port) | |||
if err != nil { | |||
exitUsage(fl) | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your preference on exit/fatal from 'helper' funcs?
Current way here prints out usage and exits with nonzero status which is what we'd want, I guess. If I tucked in the if err != nil { exitUsage(f1) }
right into those two helpers it would simplify the flow here. However, to call exitUsage(fl)
within, I'd have to pass fl
to both helpers which seems icky so perhaps I'll just leave these alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to merge.
@Russtopia Anything blocking this from merging? |
This implements https://github.com/cdr/enterprise/issues/4411
NOTE: this is intended for post 1.9 release. It involves a breaking API change to the devurl API and should be released in coordination with https://github.com/cdr/enterprise/pull/4381
What This Does
urls create
subcommand option--name <label | "">
urls ls
command and-o [human | json]
options following syntax of theusers ls
commandedit
urls subcommand which is just an alias forcreate
; just for usage stylePropose to makecreate
single-purpose (only create a new devurl) such thatedit
is the only way to modify an existing devurlChanges for compatibility with https://github.com/cdr/enterprise/pull/4381
port
argument changed to int typeTesting
Usage Examples