Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ActionCmd = &cobra.Command{ Use: "action [name]", Aliases: []string{"a"}, Short: "Destroy action files", RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("you need to provide a valid action file name in order to destroy it") } name := args[0] fileName := flect.Underscore(name) removeActions(fileName) return nil }, }
ActionCmd destroys passed action file
View Source
var MailerCmd = &cobra.Command{ Use: "mailer [name]", Aliases: []string{"l"}, Short: "Destroy mailer files", RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("you need to provide a valid mailer name in order to destroy it") } name := args[0] removeMailer(name) return nil }, }
MailerCmd destroys a passed mailer
View Source
var ResourceCmd = &cobra.Command{ Use: "resource [name]", Aliases: []string{"r"}, Short: "Destroy resource files", RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return fmt.Errorf("you need to provide a valid resource name in order to destroy it") } name := args[0] fileName := flect.Pluralize(flect.Underscore(name)) removeTemplates(fileName) if err := removeActions(fileName); err != nil { return err } removeLocales(fileName) removeModel(name) removeMigrations(fileName) return nil }, }
ResourceCmd destroys a passed resource
View Source
var YesToAll = false
YesToAll means not to ask when destroying but simply confirm all beforehand.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.