Skip to content

feat: add templates delete command - #1443

Merged
coadler merged 6 commits into
mainfrom
colin/template-delete
May 13, 2022
Merged

feat: add templates delete command#1443
coadler merged 6 commits into
mainfrom
colin/template-delete

Conversation

@coadler

@coadler coadler commented May 13, 2022

Copy link
Copy Markdown
Contributor

Resolves #1204

@coadler coadler self-assigned this May 13, 2022
@coadler
coadler force-pushed the colin/template-delete branch from a1551dc to f872b51 Compare May 13, 2022 21:54
@ammario

ammario commented May 13, 2022

Copy link
Copy Markdown
Member

This is what I like to see Mr. Adler!

Comment thread cli/templatedelete.go
RunE: func(cmd *cobra.Command, args []string) error {
var (
ctx = cmd.Context()
templateNames = []string{}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can only be a max of 1 right? I don't believe this needs to be an array!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to remove the max 1 limit! I think it's nicer if we take in more than one since it plays nicer with xargs.

Comment thread coderd/httpmw/templateparam.go
Comment thread cli/templatedelete.go Outdated
@codecov

This comment was marked as spam.

@coadler
coadler requested a review from ammario May 13, 2022 22:13

@ammario ammario left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ish

Comment thread cli/templatedelete.go Outdated
func templateDelete() *cobra.Command {
return &cobra.Command{
Use: "delete [name...]",
Short: "Delete templates.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a sentence

@coadler
coadler enabled auto-merge (squash) May 13, 2022 22:44
@coadler
coadler merged commit fe7645b into main May 13, 2022
@coadler
coadler deleted the colin/template-delete branch May 13, 2022 22:54
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
@spikecurtis

Copy link
Copy Markdown
Contributor

I think this resolves #1204 not #777

@coadler

coadler commented May 16, 2022

Copy link
Copy Markdown
Contributor Author

I think this resolves #1204 not #777

Oops!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: add coder templates delete command

5 participants