cli

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

  • Package cmd @Author: zhizhuo @IDE:GoLand @File: banner.go @Date: 2025/2/20 下午3:39*

Package cli 命令行入口。

CLI 通过 runner.NewRunner 构造完整运行时实例,调用 Run 执行批量扫描, 退出时 defer Close 释放规则池 / 缓存 / 监控器等资源。

Package cli 命令行参数解析。

参数解析只依赖标准库 flag:SDK 与 CLI 共用的 types 包不再为一个字符串切片 引入第三方命令行框架及其传递依赖。

Index

Constants

This section is empty.

Variables

View Source
 _______  ___  _
/  __\  \/\  \//
| |  _\  / \  / 
| |_///  \ /  \ 
\____/__/\/__/\\`) + "\n\n\t\tVersion: " + defaultVersion +
	"\n\t\tAuthor: " + defaultAuthor +
	"\n\t\tBuild: " + getBuildDate()

Banner 程序启动时显示的横幅

View Source
var ErrHelp = flag.ErrHelp

ErrHelp 表示用户请求了帮助信息;用法已输出,调用方应以 0 退出。

Functions

func NewCmdOptions

func NewCmdOptions() (*types.CmdOptions, error)

NewCmdOptions 解析进程命令行参数。

func ParseCmdOptions added in v1.4.0

func ParseCmdOptions(args []string, out io.Writer) (*types.CmdOptions, error)

ParseCmdOptions 解析给定参数;用法与提示写入 out。

func Run

func Run(options *types.CmdOptions) error

Run 执行批量扫描;初始化或扫描失败时返回错误,由入口决定退出码。

Types

This section is empty.

Jump to

Keyboard shortcuts

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