structer

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func Dump

func Dump(s io.Writer, fset *token.FileSet, d ast.Decl)

func LoadAstf

func LoadAstf(dir string, fset *token.FileSet) (astfs []*ast.File, err error)

func LoadFile

func LoadFile(src string) string

func SetupLogger

func SetupLogger()

Types

type FieldInfo

type FieldInfo struct {
	Name string
	Type string
}

type StructInfo

type StructInfo struct {
	PkgName  string
	Name     string
	Fields   []FieldInfo
	Embedded []string
}

func StrcutInfos

func StrcutInfos(src string, pkgname string) (infos []StructInfo, err error)

func (StructInfo) FromTemplate

func (info StructInfo) FromTemplate(path string) (out string, err error)

Jump to

Keyboard shortcuts

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