gen

package module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 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

func Debug()

func ParseFromAstFile

func ParseFromAstFile(f *ast.File, graph *Graph) error

Types

type Field

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

Field represents a field in the struct.

func (Field) IsValid

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 ParseFromFile

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

ParseFromFile 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

type StructTag = reflect.StructTag

func StructTagFromString

func StructTagFromString(v string) StructTag

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

Directories

Path Synopsis
cmd
dl command
Package main
Package main
internal
io
Package io for Default Loader
Package io for Default Loader
shell
Package shell for Default Loader
Package shell for Default Loader
tpl
Package tpl for Default Loader
Package tpl for Default Loader

Jump to

Keyboard shortcuts

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