core

package
v0.0.0-...-f885887 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterT

func FilterT[T any](src []*ast.TypeSpec) []*ast.TypeSpec

func IsDirectory

func IsDirectory(name string) bool

IsDirectory reports whether the named file is a directory.

Types

type File

type File struct {
	Pkg  *Package  // Package to which this file belongs.
	File *ast.File // Parsed AST.
	// These fields are reset for each type being generated.
	// typeName string // Name of the constant type.
	Types []*ast.TypeSpec

	Constants   []*ast.GenDecl
	Funcs       []*ast.FuncDecl
	StructTypes []string // Names of the constant values.
	// contains filtered or unexported fields
}

func (*File) GenDecl

func (f *File) GenDecl(node ast.Node) bool

type Package

type Package struct {
	Name  string
	Defs  map[*ast.Ident]types.Object
	Files []*File
}

func (*Package) GetConstants

func (p *Package) GetConstants() []*ast.GenDecl

func (*Package) GetFuncs

func (p *Package) GetFuncs() []*ast.FuncDecl

func (*Package) GetTypes

func (p *Package) GetTypes() []*ast.TypeSpec

Jump to

Keyboard shortcuts

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