Documentation ¶
Index ¶
- func MustWriteObjectToMainPackage(obj interface{}) string
- func WriteGoFileGetterWithDirFileList(req WriteGoFileGetterWithDirFileListRequest)
- func WriteGoFileGetterWithGlobalVariable(req WriteGoFileGetterRequest)
- func WriteIfStatmentToBuf(_buf *bytes.Buffer, ifExpr string, bodyFn func())
- func WriteStringToGolang(s string) string
- func WriteTestWrapFunction(req WriteTestWrapFunctionReq)
- type GoFileContext
- func (gotpl *GoFileContext) AddImportPath(importPath string)
- func (gotpl *GoFileContext) AddImportPathList(importPathList []string)
- func (gotpl *GoFileContext) AddImportPathWithAlias(importPath string, alias string)
- func (gotpl *GoFileContext) AddUnderScoreImportPath(importPath string)
- func (gotpl *GoFileContext) GetPkgImportPath() string
- func (gotpl *GoFileContext) MergeFile(gotpl1 *GoFileContext) *GoFileContext
- func (gotpl *GoFileContext) MustWriteFile(_filepath string, body []byte)
- func (gotpl *GoFileContext) MustWriteFileWithSelfBuffer(_filepath string)
- func (gotpl *GoFileContext) MustWriteGoTypePackagePrefix(pkgImportPath string) string
- func (gotpl *GoFileContext) MustWriteGoTypes(objTyp udwGoParser.Type) string
- func (gotpl *GoFileContext) MustWriteGoTypesV2(typ types.Type) string
- func (file *GoFileContext) MustWriteObject(obj interface{}) string
- func (file *GoFileContext) MustWriteObjectToBuf(obj interface{}, _buf *bytes.Buffer)
- func (file *GoFileContext) MustWriteObjectToSelfBuf(obj interface{})
- func (file *GoFileContext) MustWriteTypeByReflect(typ reflect.Type) string
- func (gotpl *GoFileContext) SetBuildFlagContent(content string)
- func (gotpl *GoFileContext) SetBuildFlagList(flagList []string)
- type WriteGoFileGetterRequest
- type WriteGoFileGetterWithDirFileListRequest
- type WriteTestWrapFunctionReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustWriteObjectToMainPackage ¶
func MustWriteObjectToMainPackage(obj interface{}) string
func WriteGoFileGetterWithDirFileList ¶
func WriteGoFileGetterWithDirFileList(req WriteGoFileGetterWithDirFileListRequest)
func WriteGoFileGetterWithGlobalVariable ¶
func WriteGoFileGetterWithGlobalVariable(req WriteGoFileGetterRequest)
func WriteIfStatmentToBuf ¶
func WriteStringToGolang ¶
func WriteTestWrapFunction ¶
func WriteTestWrapFunction(req WriteTestWrapFunctionReq)
Types ¶
type GoFileContext ¶
func NewGoFileContext ¶
func NewGoFileContext(PkgImportPath string) *GoFileContext
func (*GoFileContext) AddImportPath ¶
func (gotpl *GoFileContext) AddImportPath(importPath string)
func (*GoFileContext) AddImportPathList ¶
func (gotpl *GoFileContext) AddImportPathList(importPathList []string)
func (*GoFileContext) AddImportPathWithAlias ¶
func (gotpl *GoFileContext) AddImportPathWithAlias(importPath string, alias string)
func (*GoFileContext) AddUnderScoreImportPath ¶
func (gotpl *GoFileContext) AddUnderScoreImportPath(importPath string)
func (*GoFileContext) GetPkgImportPath ¶
func (gotpl *GoFileContext) GetPkgImportPath() string
func (*GoFileContext) MergeFile ¶
func (gotpl *GoFileContext) MergeFile(gotpl1 *GoFileContext) *GoFileContext
func (*GoFileContext) MustWriteFile ¶
func (gotpl *GoFileContext) MustWriteFile(_filepath string, body []byte)
func (*GoFileContext) MustWriteFileWithSelfBuffer ¶
func (gotpl *GoFileContext) MustWriteFileWithSelfBuffer(_filepath string)
func (*GoFileContext) MustWriteGoTypePackagePrefix ¶
func (gotpl *GoFileContext) MustWriteGoTypePackagePrefix(pkgImportPath string) string
func (*GoFileContext) MustWriteGoTypes ¶
func (gotpl *GoFileContext) MustWriteGoTypes(objTyp udwGoParser.Type) string
func (*GoFileContext) MustWriteGoTypesV2 ¶
func (gotpl *GoFileContext) MustWriteGoTypesV2(typ types.Type) string
func (*GoFileContext) MustWriteObject ¶
func (file *GoFileContext) MustWriteObject(obj interface{}) string
func (*GoFileContext) MustWriteObjectToBuf ¶
func (file *GoFileContext) MustWriteObjectToBuf(obj interface{}, _buf *bytes.Buffer)
func (*GoFileContext) MustWriteObjectToSelfBuf ¶
func (file *GoFileContext) MustWriteObjectToSelfBuf(obj interface{})
func (*GoFileContext) MustWriteTypeByReflect ¶
func (file *GoFileContext) MustWriteTypeByReflect(typ reflect.Type) string
func (*GoFileContext) SetBuildFlagContent ¶
func (gotpl *GoFileContext) SetBuildFlagContent(content string)
func (*GoFileContext) SetBuildFlagList ¶
func (gotpl *GoFileContext) SetBuildFlagList(flagList []string)
type WriteTestWrapFunctionReq ¶
type WriteTestWrapFunctionReq struct { PkgPath string FuncName string FuncBody []byte GoFile *GoFileContext }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.