mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-29 04:54:57 +02:00
feat: add eval command shorthand and reorder snapshot-release tasks
- Add top-level 'eval' command as shorthand for 'func eval' with multiple aliases (e, ev, evl, evla) - Reorder Makefile snapshot-release to copy registry metadata before building binary - Update contact URL in Swagger docs from osmedeus/osmedeus to osmedeus - Update registry metadata with katana v1.4.0 (web crawling and spidering framework)
This commit is contained in:
@@ -57,6 +57,15 @@ var functionListCmd = &cobra.Command{
|
||||
RunE: runFunctionList,
|
||||
}
|
||||
|
||||
// evalCmd is a top-level shorthand for 'func eval'
|
||||
var evalCmd = &cobra.Command{
|
||||
Use: "eval",
|
||||
Aliases: []string{"e", "ev", "evl", "evla"},
|
||||
Short: "Evaluate a script (shorthand for 'func eval')",
|
||||
Long: UsageFunctionEval(),
|
||||
RunE: runFunctionEval,
|
||||
}
|
||||
|
||||
func init() {
|
||||
functionEvalCmd.Flags().StringVarP(&evalScript, "eval", "e", "", "script to evaluate")
|
||||
functionEvalCmd.Flags().StringVarP(&evalTarget, "target", "t", "", "target value for {{target}} variable")
|
||||
@@ -73,6 +82,16 @@ func init() {
|
||||
functionListCmd.Flags().IntVar(&funcColumnWidth, "width", 60, "max column width (wraps lines instead of truncating)")
|
||||
functionListCmd.Flags().BoolVar(&funcShowExample, "example", false, "show example usage below each function description")
|
||||
|
||||
// evalCmd flags (same as functionEvalCmd - it's a shorthand)
|
||||
evalCmd.Flags().StringVarP(&evalScript, "eval", "e", "", "script to evaluate")
|
||||
evalCmd.Flags().StringVarP(&evalTarget, "target", "t", "", "target value for {{target}} variable")
|
||||
evalCmd.Flags().StringArrayVar(&evalParams, "params", nil, "additional parameters (key=value format)")
|
||||
evalCmd.Flags().BoolVar(&evalStdin, "stdin", false, "read script from stdin")
|
||||
evalCmd.Flags().StringVarP(&evalFunctionName, "function", "f", "", "function name to call (remaining args become function arguments)")
|
||||
evalCmd.Flags().StringVarP(&funcTargetsFile, "targets", "T", "", "file containing targets (one per line)")
|
||||
evalCmd.Flags().StringVar(&funcFunctionFile, "function-file", "", "file containing the function/script to execute")
|
||||
evalCmd.Flags().IntVarP(&funcConcurrency, "concurrency", "c", 1, "number of concurrent executions")
|
||||
|
||||
functionCmd.AddCommand(functionEvalCmd)
|
||||
functionCmd.AddCommand(functionListCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user