parser

package
v0.0.0-...-0a897ee Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name      string
	Type      string
	EnvTag    string
	IsPointer bool
	IsArray   bool
}

Field encapsulates the struct field metadata needed for the template execution

func NewField

func NewField(field *ast.Ident, fieldType string, tags reflect.StructTag) Field

NewField creates a new instance of field

type Type

type Type struct {
	FileName string
	Name     string
	Fields   []Field
	Package  string
}

Type is the type defenition struct

func NewType

func NewType(name string) *Type

NewType returns a new instance of Type with given name

func (*Type) Parse

func (t *Type) Parse(fileName string) error

Parse parses Type metadata from given file using go parser & ast

Jump to

Keyboard shortcuts

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