1
2
Fork
You've already forked unkai
0
Go test coverage rendering
  • Go 98.8%
  • Just 1.2%
Find a file
Clouds ffa1c5eca5
All checks were successful
Run tests / test-go (push) Successful in 1m11s
Merge pull request 'Some low-hanging fruit speed ups' ( #12 ) from speed-up into latest
Reviewed-on: #12 
2026年07月04日 14:51:42 +02:00
.forgejo/workflows add forgejo action 2026年06月24日 22:06:54 +02:00
dagger add instructions for forgejo example 2026年06月24日 22:06:54 +02:00
data add tests where coverage data is stale 2026年07月04日 10:31:57 +02:00
internal correct mistake in license notice 2026年07月04日 14:38:25 +02:00
.gitattributes add example image 2026年06月24日 09:06:19 +02:00
.gitignore add justfile 2026年06月25日 20:55:26 +02:00
dagger.json add dagger 2026年06月24日 21:15:35 +02:00
go.mod only require go version 1.16.0 2026年06月27日 20:39:55 +02:00
go.sum move color completely to render 2026年06月25日 22:21:23 +02:00
justfile add tests for getRelevantBlocks and isCoverageDataUpToDate 2026年07月03日 22:15:18 +02:00
LICENSE add license 2026年06月29日 21:15:18 +02:00
main.go correct mistake in license notice 2026年07月04日 14:38:25 +02:00
README.org when no functions in list, print all 2026年06月25日 22:31:04 +02:00

Unkai - 雲海 (sea of clouds)

Go test coverage rendering

A sea of clouds covering the landscape

Install

go install codeberg.org/clouds666/unkai@latest

Usage

Go test coverage rendering - "Sea of clouds"
Usage:
 unkai [flags]
Flags:
 -c, --coverage string Pattern of the go sources (default "coverage/textfmt.out")
 -f, --functions strings functions to show (empty means all, example "--function fun1,fun2")
 -h, --help help for unkai
 -s, --source string Directory of the go sources (default ".")

Examples

In this project

Terminal output

go run . --source ./data/example-project --functions some,other --coverage data/cover.out

Use freeze to get beautiful pictures

go run . --source ./data/example-project --functions some,other --coverage ./data/cover.out | tee /dev/tty | freeze

Result will be ./freeze.png

/clouds666/unkai/media/branch/latest/data/example-output.png

Forgejo

Make sure you have the file coverage/textfmt.out. For this example, the unit test coverage is enough. In the forgejo project root, run:

unkai --functions AddDeletedBranch,GetDeletedBranchByID

Developing

Using just

Run tests

just test

Show coverage

just cover-show GetFunctions,functionFilter