demo

command
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 6 Imported by: 0 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

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