feat: 新增 file/svc/archive/sys/log/fw 分组并扩充 net、proc
- file:findbig 按大小、findrecent 按修改时间、findname 按名称查找文件 - svc:systemctl / launchctl / sc 统一接口,status、enable、disable、logs - archive:按扩展名自动识别格式并解压,支持 tar.gz/tgz/tar.bz2/tar.xz/tar/zip/gz - sysinfo:OS、CPU、内存、磁盘一览 - log:journalctl / log show / wevtutil 搜索关键字与查看最近日志 - fw:ufw / firewalld / iptables / ALF / netsh 统一接口,status、allow、deny - net 新增 ping、trace(mtr 优先)、dns(dig 优先)、curl HTTP 诊断 - proc 新增 topmem、topcpu、killname - 危险操作(svc enable/disable、proc killname、fw allow/deny)需 --yes 确认 - 注册表、executor 派发表、cli 分组说明与 README 同步更新
This commit is contained in:
@@ -27,6 +27,14 @@ func TestBuiltinIDsStable(t *testing.T) {
|
||||
"diagnose",
|
||||
"disk.usage", "net.pids", "net.ports", "proc.nohup", "proc.wait", "java.run", "git.retime", "pkg.refreshindex",
|
||||
"user.grant", "user.revoke",
|
||||
"file.findbig", "file.findrecent", "file.findname",
|
||||
"svc.status", "svc.enable", "svc.disable", "svc.logs",
|
||||
"archive.extract",
|
||||
"sysinfo",
|
||||
"proc.topmem", "proc.topcpu", "proc.killname",
|
||||
"net.ping", "net.trace", "net.dns", "net.curl",
|
||||
"log.search", "log.last",
|
||||
"fw.status", "fw.allow", "fw.deny",
|
||||
}
|
||||
if got := reg.IDs(); !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("IDs() =\n%v\nwant\n%v", got, want)
|
||||
|
||||
Reference in New Issue
Block a user