ast

package
v0.0.0-...-7fbf2ef Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFunc

func FindFunc(filepath string) map[string]*ast.FuncDecl

func FindImportPath

func FindImportPath(filePath string) ([]string, error)

FindImportPath find importPath list

func FindInterface

func FindInterface(interfaceName string, filePath string) *ast.InterfaceType

func FindProviderName

func FindProviderName(filePath string) ([]string, error)

FindProviderName find provider name list

func FindStruct

func FindStruct(structName string, filePath string) *ast.StructType

func FindWireBind

func FindWireBind(filePath string) (map[string]*InterfaceSpec, error)

FindWireBind find elements of wire.Bind()

func GetPostArgument

func GetPostArgument(property []string, propertyType []string) []jen.Code

func GetPropertyByStructAst

func GetPropertyByStructAst(structAst *ast.StructType) ([]string, []string)

func PrintFile

func PrintFile(filepath string)

func PrintStruct

func PrintStruct(structAst ast.StructType)

Types

type InterfaceSpec

type InterfaceSpec struct {
	Name       string
	ImportPath string
}

Jump to

Keyboard shortcuts

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