Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" Commit = "dev" Date = "dev" )
Version, Commit, and Date are set at build time via -ldflags.
Functions ¶
func NeedsDefaultScan ¶
NeedsDefaultScan returns true when args contain no explicit subcommand, meaning "scan" should be prepended. This preserves the UX where `sightjack [flags]` behaves as `sightjack scan [flags]`.
func NewRootCommand ¶
NewRootCommand creates the root cobra command with all subcommands attached. Returning *cobra.Command enables test injection via SetArgs/SetOut/SetErr.
func ReorderArgs ¶
ReorderArgs moves a known subcommand to the front of args so cobra routes correctly when subcommand-local flags appear before the subcommand name (e.g., "sightjack --json scan" → "sightjack scan --json"). If no subcommand is found, args are returned unchanged.
Types ¶
This section is empty.