commands

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeCommand

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

Implementation of both the Parser Task interface and the Flags package's Commander interface. Stores input flags for the task, as well as fields representing the data to be collected.

func NewAnalyzeCommand

func NewAnalyzeCommand(globals *config.GlobalOptions) *AnalyzeCommand

Create a new instance of the AnalyzeCommand using a reference to the global options.

func (*AnalyzeCommand) Clone

func (cmd *AnalyzeCommand) Clone() parser.Task

Create a new instance of the AnalyzeCommand with the same initial state and flags, COPYING `globals`. Note that `output` is shared by reference, so the same `FileWriter` instance is shared by all cloned instances.

func (*AnalyzeCommand) Close

func (a *AnalyzeCommand) Close()

func (*AnalyzeCommand) Execute

func (cmd *AnalyzeCommand) Execute(args []string) error

Validate the values of this Command's flags, then run the task itself THIS SHOULD ONLY BE CALLED ONCE PER PROGRAM EXECUTION.

func (*AnalyzeCommand) Name

func (a *AnalyzeCommand) Name() string

func (*AnalyzeCommand) ReportResults

func (a *AnalyzeCommand) ReportResults() error

func (*AnalyzeCommand) SetProjectDir

func (cmd *AnalyzeCommand) SetProjectDir(dir string)

Set the project directory for this task.

func (*AnalyzeCommand) Visit

func (a *AnalyzeCommand) Visit(fset *token.FileSet, file *ast.File)

type StatisticsCommand

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

todo maybe make a custom interface for representing this combination Implementation of both the Parser Task interface and the Flags package's Commander interface. Stores input flags for the task, as well as fields representing the data to be collected.

func NewStatisticsCommand

func NewStatisticsCommand(globals *config.GlobalOptions) *StatisticsCommand

Create a new instance of the StatisticsCommand using a reference to the global options.

func (*StatisticsCommand) Clone

func (cmd *StatisticsCommand) Clone() parser.Task

Create a new instance of the StatisticsCommand with the same initial state and flags, COPYING `globals`. Note that `output` is shared by reference, so the same `FileWriter` instance is shared by all cloned instances.

func (*StatisticsCommand) Close

func (s *StatisticsCommand) Close()

func (*StatisticsCommand) Execute

func (cmd *StatisticsCommand) Execute(args []string) error

Validate the values of this Command's flags, then run the task itself. THIS SHOULD ONLY BE CALLED ONCE PER PROGRAM EXECUTION.

func (*StatisticsCommand) Name

func (s *StatisticsCommand) Name() string

func (*StatisticsCommand) ReportResults

func (s *StatisticsCommand) ReportResults() error

func (*StatisticsCommand) SetProjectDir

func (cmd *StatisticsCommand) SetProjectDir(dir string)

Set the project directory for this task.

func (*StatisticsCommand) Visit

func (s *StatisticsCommand) Visit(fset *token.FileSet, file *ast.File)

Jump to

Keyboard shortcuts

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