Documentation ¶
Index ¶
- Constants
- func ScanDir(path string, mode ScanMode, filter ScannerFilter) ([]*Module, []*Package, error)
- func ScanFilter(_, name string, _ fs.DirEntry) bool
- type Block
- type Generator
- func (g *Generator) AbsPath(path string) string
- func (g *Generator) Generate(tmplFile string, wr io.Writer) (*Generator, error)
- func (g *Generator) GenerateFile(template, file string, perm os.FileMode) (*Generator, error)
- func (g *Generator) Root() string
- func (g *Generator) ScanDir(dir string, mode ScanMode, filter ScannerFilter) (*Generator, error)
- type Module
- type Package
- type ParaBlock
- type PreBlock
- type ScanMode
- type ScannerFilter
- type ScannerFilterFunc
- type Section
Constants ¶
View Source
const ( ScanModule ScanMode = 1 << iota ScanPackages ScanDeep ScanNone ScanMode = 0 ScanAll = ScanModule | ScanPackages ScanAllDeep = ScanModule | ScanPackages | ScanDeep ScanPackagesDeep = ScanPackages | ScanDeep )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func (*Generator) GenerateFile ¶
type Module ¶
func NewModuleFromModfile ¶
type Package ¶
type Package struct { // Name of package as used with a package statement. Name string // Path relative to Module.Path, when joined they form ImportPath. Path string Module *Module Sections []*Section }
func NewPackage ¶
func (*Package) ImportPath ¶
type ScannerFilter ¶
type ScannerFilterFunc ¶
func (ScannerFilterFunc) FilterScan ¶
func (f ScannerFilterFunc) FilterScan(path, name string, entry fs.DirEntry) bool
Click to show internal directories.
Click to hide internal directories.