Skip to content

v1.3.0

Latest

Choose a tag to compare

@WanQTs WanQTs released this 21 Sep 13:19

v1.3.0 — 新增 CLI 命令行模式(语法对标 md5sum/sha256sum)/ New CLI mode (md5sum/sha256sum-style).

更新 / What's New

  • 同一个 exe 即命令行工具:终端中带参数调用自动进入 CLI;无参数、或仅一个清单文件参数时仍打开图形界面(双击清单行为不变)
  • 哈希计算:gohash setup.iso(默认 SHA-256);-a 多算法一次扫描(可重复或逗号分隔);目录递归、通配符自行展开
  • 校验:gohash -c list.sha256(md5sum -c 兼容,逐行 OK/FAILED);--quiet 只看失败行、--status 完全静默只看退出码
  • 单算法输出为严格 md5sum 格式:gohash -a sha256 dir > list.sha256 的产物可被 gohash -c 与 GNU sha256sum 直接复用(计算→校验闭环)
  • 退出码 0/1/2(全部成功 / 有失败或不一致 / 用法或清单错误),脚本与管道友好
  • GBK 控制台下中文路径不乱码(控制台输出走 WriteConsoleW,不改动父控制台代码页)
  • The same exe is now a CLI tool: passing arguments in a terminal enters CLI mode; no arguments — or a single manifest argument — still opens the GUI (double-click behavior unchanged)
  • Hash: gohash setup.iso (SHA-256 by default); -a runs multiple algorithms in one scan (repeatable or comma-separated); directories recurse, wildcards expand
  • Verify: gohash -c list.sha256 (md5sum -c compatible, per-line OK/FAILED); --quiet hides OK lines, --status reports via exit code only
  • Single-algorithm output is strict md5sum format — the product of gohash -a sha256 dir > list.sha256 can be re-verified by both gohash -c and GNU sha256sum
  • Exit codes 0/1/2 (all OK / failures / usage or manifest error), friendly to scripts and pipes
  • Non-ASCII paths render correctly even on GBK consoles (WriteConsoleW, no code-page changes)

下载 / Downloads

文件 体积 说明
GoHashTool-v1.3.0-windows-amd64.exe 10.6 MB 标准版
GoHashTool-v1.3.0-windows-amd64-upx.exe 3.7 MB UPX 压缩版

单文件绿色软件,双击即用,无需安装。需 Windows 10/11 64 位与 WebView2 运行时(Win11 已预装;缺少时会提示安装)。
Portable single-file exe. Requires 64-bit Windows 10/11 and the WebView2 Runtime (preinstalled on Windows 11).

质量验证 / Verification

  • go test ./...go test -race ./...go vetgofmt 全部通过;前端 vitest 29/29
  • exe --selftest 无界面自检(已知值 / SUM 闭环 / 清单解析)退出码 0(标准版与 UPX 版均验证)
  • CLI 实测:md5 已知值精确匹配、md5sum 格式输出、-c 校验闭环、篡改/缺失/坏清单退出码 1/1/2

Full Changelog: v1.2.1...v1.3.0