model

package
v0.0.0-...-a566d0d Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrNotExists

func ErrNotExists(pkgName string) error

func ReachableFiles

func ReachableFiles(g *DefGraph, start string) (member []string)

Types

type ASF

type ASF struct {
	// contains filtered or unexported fields
}

func GetASF

func GetASF(dir string) (a *ASF, err error)

func (*ASF) PackageFiles

func (a *ASF) PackageFiles(pkgName string) (files []string, err error)

func (*ASF) PackedCode

func (a *ASF) PackedCode(pkgName string, members []string) (pc PackedCode, err error)

func (*ASF) PackedDecls

func (a *ASF) PackedDecls(pkgName string, files []string) (defs []ast.Decl, imports *ast.GenDecl)

type DefGraph

type DefGraph struct {
	Package string
	ASF     *ASF
	// contains filtered or unexported fields
}

func GenDefGraphFromASF

func GenDefGraphFromASF(a *ASF, pkgName string) (*DefGraph, error)

func NewDefGraph

func NewDefGraph() *DefGraph

type PackedCode

type PackedCode struct {
	// Package is package name (e.g. `main`)
	Package string
	// SrcFiles is used source file name list (e.g. `[src_a.go src_b.go]`)
	SrcFiles string
	// Imports is import declare code of go (e.g. `import "strings"`)
	Imports string
	// Decls is packed code body
	Decls string
}

PackedCode is passed value to template

Jump to

Keyboard shortcuts

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