packagecmdimport("go.jolheiser.com/tmpl/registry""github.com/rs/zerolog/log""github.com/urfave/cli/v2")varRemove=&cli.Command{Name:"remove",Usage:"Remove a template",Description:"Remove a template from the registry",ArgsUsage:"[name]",Action:runRemove,}funcrunRemove(ctx*cli.Context)error{ifctx.NArg()<1{returncli.ShowCommandHelp(ctx,ctx.Command.Name)}reg,err:=registry.Open(registryFlag)iferr!=nil{returnerr}iferr:=reg.RemoveTemplate(ctx.Args().First());err!=nil{returnerr}log.Info().Msgf("Successfully removed %q",ctx.Args().First())returnnil}