demo

command
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

cmd/demo 盲文点阵进度条演示(展示 kit 正式 API 用法)。

用法:

go run ./cmd/demo <command> [flags]

command:

snapshot   静态快照(多档进度),无动画,看 RenderBar 长相
single     单曲下载:Spinner(缓冲) + Progress(下载) + Warnf(元数据警告)
multi      批量下载(1 总 bar + 3 worker,♪ 完成态)

flags:

-json     模拟全局 --json(三态抑制:进度完全静默,结果走 stdout)
-speed    速度倍率,默认 1.0;0.3 为慢动作

通过 Kit 工厂(k.NewProgress/k.NewSpinner)展示正式 API: 命令层不用自己判断 TTY/--json,工厂内部封装三态规矩。

Jump to

Keyboard shortcuts

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