toolargs

package
v0.0.0-nightly.20260627 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

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 BoolFlagEnabled(args []string, long string) bool

func HasFlag

func HasFlag(args []string, long string) bool

func NormalizeFlags added in v0.2.7

func NormalizeFlags(args []string, known map[string]struct{}, aliases map[string]string) []string

NormalizeFlags converts single-dash flags to double-dash when they match a known flag, and applies alias mappings. Unknown flags pass through.

func ResolvePath added in v0.2.7

func ResolvePath(value, workDir string) string

ResolvePath resolves a single path relative to workDir. Returns value unchanged if empty, absolute, or starts with "-".

func ResolveRelativePaths added in v0.2.7

func ResolveRelativePaths(args []string, fileFlags map[string]bool, workDir string) []string

ResolveRelativePaths resolves relative file paths in args against workDir. fileFlags is the set of flags whose next argument (or =value) is a file path.

Types

type Base added in v0.2.7

type Base struct {
	Logger  telemetry.Logger
	Proxy   string
	WorkDir string
}

func (*Base) InitLogger added in v0.2.7

func (b *Base) InitLogger(logger telemetry.Logger)

func (*Base) SetProxy added in v0.2.7

func (b *Base) SetProxy(proxy string)

func (*Base) SetWorkDir added in v0.2.7

func (b *Base) SetWorkDir(dir string)

Jump to

Keyboard shortcuts

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