cmd

package
v0.0.0-...-6dcb45d Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type FileMap

type FileMap struct {
	PackageTemplate map[string]string
	ModelTemplate   map[string]string
	QueryTemplate   map[string]string
	OtherTemplate   map[string]string
	NormalFile      map[string]string
}

package.tmpl model.tmpl query.tmpl

other.tmpl

t.txt go.mod

文件中带有

@model.go.tmpl @model_logic.go.tmpl @model_handler.go.tmpl

扫描文件 所有package.tmpl文件,用全局数据过一遍 所有model.tmpl文件,用model数组过一遍 所有query.tmpl文件,用query数组过一遍

所有普通tmpl文件,用全局数据过一遍 非模板文件,直接拷贝过去

用模板生成的文件保持模板文件的目录结构不变,且都去掉.tmpl

func NewFileMap

func NewFileMap() *FileMap

Jump to

Keyboard shortcuts

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