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

gookit / config / 39977141772
97%

Build:
DEFAULT BRANCH: master
Ran 23 Oct 2026 03:19PM UTC
Jobs 6
Files 11
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

23 Oct 2026 03:18PM UTC coverage: 98.203% (+0.02%) from 98.182%
39977141772

push

github

inhere
fix(config): keep the config data stable while a hook is running

The hook is fired after the data lock is released (#225), so a hook that reads the

whole data set - eg: SaveFileOnSet() calls DumpToFile - races with another goroutine

calling Set: go test -race reports a data race on c.data, and Go may even abort

with 'concurrent map read and map write'.

- add an outer hookMu that serializes the data change with its hook. the hook still

  runs after the data lock is released, so the getter methods do not deadlock, but

  no other Set/SetData/ClearData can change the data while the hook is running.

- the lock order is hookMu -> lock, and ClearData now swaps the data map under the

  data lock.

- extract the locked set logic to Config.setValue().

- document the hook contract on HookFunc: use the getters, do not call

  Set/SetData/ClearData in a hook, the data is stable while the hook runs.

Tests: TestSetHookKeepsDataStable (another writer must wait for a running hook) and

TestSetHookCanDumpAllData (hook dumps the data while two goroutines Set).

20 of 20 new or added lines in 2 files covered. (100.0%)

1257 of 1280 relevant lines covered (98.2%)

6.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Go-1.24 - 39977141772.1 23 Oct 2026 03:19PM UTC 11
98.13
GitHub Action Run
2 Go-1.25 - 39977141772.2 23 Oct 2026 03:19PM UTC 11
98.13
GitHub Action Run
3 Go-1.22 - 39977141772.3 23 Oct 2026 03:19PM UTC 11
98.13
GitHub Action Run
4 Go-1.23 - 39977141772.4 23 Oct 2026 03:19PM UTC 11
98.13
GitHub Action Run
5 Go-stable - 39977141772.5 23 Oct 2026 03:19PM UTC 11
97.77
GitHub Action Run
6 Go-1.21 - 39977141772.6 23 Oct 2026 03:19PM UTC 11
98.13
GitHub Action Run
Source Files on build 39977141772
  • Tree
  • List 11
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • df5f5683 on github
  • Prev Build on master (#39976249751)
  • Next Build on master (#40073463905)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc