Documentation
¶
Index ¶
- func ParseGoFile(fset *token.FileSet, filename, importPath string, file io.Reader, ...) error
- func ParseGoFiles(fsys fs.FS, root string) (*model.DataModel, error)
- func ParseSubCommandComments(text string) (cmdName string, subCommandSequence []string, description string, ...)
- type CommandTree
- type CommandsTree
- type CommentParser
- type ParsedParam
- type SubCommandTree
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseGoFile ¶
func ParseGoFiles ¶
ParseGoFiles parses the Go files in the provided filesystem to build the command model. It expects a go.mod file at the root of the filesystem (or root directory).
func ParseSubCommandComments ¶
Types ¶
type CommandTree ¶
type CommandsTree ¶
type CommandsTree struct {
Commands map[string]*CommandTree
PackagePath string
}
func (*CommandsTree) Insert ¶
func (cst *CommandsTree) Insert(importPath, packageName, cmdName string, subcommandSequence []string, s *model.SubCommand)
type CommentParser ¶
type CommentParser struct{}
type ParsedParam ¶
type SubCommandTree ¶
type SubCommandTree struct {
SubCommands map[string]*SubCommandTree
*model.SubCommand
}
func NewSubCommandTree ¶
func NewSubCommandTree(subCommand *model.SubCommand) *SubCommandTree
func (*SubCommandTree) Insert ¶
func (sct *SubCommandTree) Insert(importPath, packageName string, sequence []string, s *model.SubCommand)
Click to show internal directories.
Click to hide internal directories.