gen

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gen for Default Loader

Package gen for Default Loader

Package gen for Default Loader

Package gen for Default Loader

Package gen for Default Loader

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.0.8

func Debug()

Types

type Field

type Field struct {
	IsBasic bool
	Name    string
	Type    string
	Value   string
}

Field represents a field in the struct.

func (Field) IsValid added in v0.0.8

func (f Field) IsValid() bool

IsValid checks if the field is valid.

type Graph

type Graph struct {
	Package string
	Imports []string
	Structs []*Struct
}

Graph represents the graph structure.

func ParseFromTags

func ParseFromTags(fileName string) (*Graph, error)

ParseFromTags parse default tags from struct.

type Struct

type Struct struct {
	Name            string
	DefaultFuncName string
	Fields          []*Field
}

Struct represents the structure.

func (Struct) IsValid

func (s Struct) IsValid() bool

IsValid checks if the struct is valid.

type StructTag added in v0.0.9

type StructTag = reflect.StructTag

func NewStructTag added in v0.0.9

func NewStructTag(v string) StructTag

NewStructTag creates a new StructTag by trimming the backticks from the input string.