Documentation
¶
Overview ¶
Package easyparser provides a Go module parser for AST
Package easyparser provides a Go module parser for AST ¶
Package easyparser provides a Go module parser for AST ¶
Package easyparser provides a Go module parser for AST ¶
Package easyparser provides a Go module parser for AST ¶
Package easyparser provides a Go module parser for AST
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All = func(opt *FilterOpt) bool { return true }
All exports all interfaces
View Source
var Default = func(opt *FilterOpt) bool { if !opt.BasePackage { return false } if !opt.Exported { return false } return true }
Default exports all other than neither in base-package nor exported
Functions ¶
func GetPackageNameFromPath ¶ added in v0.3.3
GetPackageNameFromPath - get package name from last element of path
func SplitPackageStruct ¶ added in v0.3.3
SplitPackageStruct - split package.struct
Types ¶
type FilterOpt ¶
type FilterOpt struct {
BasePackage bool
Package string
Name string
Exported bool
// Dependency - 他のstructから依存されている場合にtrueとなる
// 同じstructに対して複数回呼ばれ、依存されていない状況ではfalseとして呼ばれる可能性がある
// 一度でもtrueとして返せば出力される
// dependencyがfalseの時にtrueを返す場合、trueでも常にtrueを返すべきである
Dependency bool
}
FilterOpt is options to filter exported interfaces
type Parser ¶
type Parser struct {
Filter func(opt *FilterOpt) bool
Replacer func(t types.Type) tstypes.Type
// ForceMapNonNullable provides backward compatibility to interpret map as non-nullable
ForceMapNonNullable bool
// IgnoreOmittedJSONField is a flag to ignore omitted json fields
IgnoreOmittedJSONField bool
// contains filtered or unexported fields
}
Parser is a Go module parser for TypeScript AST
func (*Parser) GetBasePackage ¶
GetBasePackage returns a base module for the root package
Click to show internal directories.
Click to hide internal directories.