generate

package
v1.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2022 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdGenerate = &commands.Command{
	UsageLine: "generate [command]",
	Short:     "Source code generator",
	Long: `▶ {{"To scaffold out your entire application:"|bold}}

     $ radical generate scaffold [scaffoldname] [-fields="title:string,body:text"] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"]

  ▶ {{"To generate a Model based on fields:"|bold}}

     $ radical generate model [modelname] [-fields="name:type"]

  ▶ {{"To generate a controller:"|bold}}

     $ radical generate controller [controllerfile]

  ▶ {{"To generate a CRUD view:"|bold}}

     $ radical generate view [viewpath]

  ▶ {{"To generate a migration file for making database schema updates:"|bold}}

     $ radical generate migration [migrationfile] [-fields="name:type"]

  ▶ {{"To generate swagger doc file:"|bold}}

     $ radical generate docs

  ▶ {{"To generate a test case:"|bold}}

     $ radical generate test [routerfile]

  ▶ {{"To generate appcode based on an existing database:"|bold}}

     $ radical generate appcode [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"] [-level=3]
`,
	PreRun: func(cmd *commands.Command, args []string) { version.ShowShortVersionBanner() },
	Run:    GenerateCode,
}

Functions

func GenerateCode

func GenerateCode(cmd *commands.Command, args []string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL