Documentation
¶
Index ¶
- Variables
- func BoolFlagEnabled(args []string, long string) bool
- func GoFlagsHelp(name string, data any) string
- func HasFlag(args []string, long string) bool
- func NewGoFlagsParser(name string, data any) *goflags.Parser
- func NormalizeFlags(args []string, known map[string]struct{}, aliases map[string]string) []string
- func ResolveRelativePaths(args []string, fileFlags map[string]bool, workDir string) []string
- type Base
Constants ¶
This section is empty.
Variables ¶
View Source
var CommonAliases = map[string]string{
"-etags": "-exclude-tags",
"-eid": "-exclude-id",
"-es": "-exclude-severity",
"-tl": "-template-list",
}
CommonAliases defines nuclei-style short flag aliases shared across tools.
Functions ¶
func BoolFlagEnabled ¶
func GoFlagsHelp ¶
GoFlagsHelp renders help directly from go-flags struct tags.
func NewGoFlagsParser ¶
NewGoFlagsParser returns the parser shared by a scanner's runtime argument handling and generated help. Keeping both paths on the same options struct prevents the CLI documentation from drifting away from accepted flags.
func NormalizeFlags ¶
NormalizeFlags converts single-dash flags to double-dash when they match a known flag, and applies alias mappings. Unknown flags pass through.
Types ¶
type Base ¶
type Base struct {
Logger telemetry.Logger
Proxy string
WorkDir string
DataBus *eventbus.Bus[output.ToolDataEvent]
}
func (*Base) EmitDataCtx ¶
func (*Base) InitLogger ¶
func (*Base) SetWorkDir ¶
Click to show internal directories.
Click to hide internal directories.