gen

package
v0.0.0-...-88900cc Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShowOnly bool

Functions

func GenerateOne

func GenerateOne(path string, showOnly, ignoreAfterWork bool)

GenerateOne 仅生成一个指定路径的代码

func GenerateWalk

func GenerateWalk(root string, showOnly, ignoreAfterWork bool)

GenerateWalk 遍历root目录下所有的文件,根据生成器acceptSuffix去匹配它们的文件名 如果匹配到了,执行生成逻辑生成对应的代码

func Register

func Register(suffix, compName string, genFunc GenFunc, after AfterFunc)

Types

type AfterFunc

type AfterFunc func(compile.CompileResult)

type GenFunc

type GenFunc func(*coder.Coder, compile.CompileResult)

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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