• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gdassori / micelio / 22016734907
85%

Build:
DEFAULT BRANCH: master
Ran 14 Feb 2026 11:43AM UTC
Jobs 1
Files 20
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Feb 2026 11:42AM UTC coverage: 84.192% (+1.0%) from 83.201%
22016734907

push

github

gdassori
Extract command registry from SSH server

Replace hardcoded switch statement in handleCommand with a pluggable
CommandRegistry. Built-in commands (/who, /nick, /quit, /help) are
registered during NewServer; external packages can register additional
commands via srv.Commands().Register() before Start().

## Features

- Pluggable CommandRegistry with dispatch, registration, and dynamic help
- Built-in commands registered automatically during NewServer
- External packages can register custom commands before server starts
- Help output generated dynamically from all registered commands

## Hardening

- Registry freezes automatically when Listen() is called
- Register() panics if called after freeze (prevents late registration bugs)
- CommandRegistrar interface restricts external API to registration only
- Thread-safe with sync.RWMutex (write lock for Register, read lock for Dispatch)
- Prevents race conditions from concurrent registration/dispatch

## Testing

- 14 unit tests: dispatch, help, freeze, concurrency, builtins
- TestRegistryConcurrentDispatch: 100 goroutines stress test
- All tests pass with -race detector
- Coverage: 87.7% (+2.1%)
- golangci-lint: 0 issues

## Tooling

- Add golangci-lint to mise.toml for consistent linting

Closes #18

1864 of 2214 relevant lines covered (84.19%)

224.27 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
26
84.49
0.51% server.go
Jobs
ID Job ID Ran Files Coverage
1 22016734907.1 14 Feb 2026 11:43AM UTC 20
84.19
GitHub Action Run
Source Files on build 22016734907
  • Tree
  • List 20
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22016734907
  • cff06b7d on github
  • Prev Build on master (#22015514292)
  • Next Build on master (#22016804164)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc