parser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StdLanguage = "go"
)

Variables

This section is empty.

Functions

func GetRawContent

func GetRawContent(fset *token.FileSet, file []byte, node ast.Node, collectComment bool) []byte

func IsTestPackage

func IsTestPackage(pkgPath string) bool

Types

type GoParser

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

golang parser, used parse multle packages from the entire project

func NewParser

func NewParser(name string, homePageDir string, o Options) *GoParser

func (*GoParser) ParseModule

func (p *GoParser) ParseModule(mod *Module, dir string) (err error)

func (*GoParser) ParseNode

func (p *GoParser) ParseNode(pkgPath string, name string) (Repository, error)

func (*GoParser) ParsePackage

func (p *GoParser) ParsePackage(pkgPath PkgPath) (Repository, error)

func (*GoParser) ParseRepo

func (p *GoParser) ParseRepo() (Repository, error)

ParseRepo parse the entiry repo from homePageDir recursively until end

type Options

type Options struct {
	ReferCodeDepth int
	Excludes       []string
	CollectComment bool
	NeedTest       bool
	LoadByPackages bool
}

Jump to

Keyboard shortcuts

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