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

go-mate / go-work / 20190688123
66%
main: 66%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v0.0.13
DEFAULT BRANCH: main
Ran 13 Dec 2025 10:21AM UTC
Jobs 5
Files 5
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

13 Dec 2025 10:19AM UTC coverage: 65.865% (-0.03%) from 65.899%
20190688123

push

github

yangyile
Streamline workspath API with functional options pattern

BREAKING CHANGES - Migration Guide:
- Old: NewOptions().WithIncludeCurrentProject(true).WithIncludeSubModules(true)
- New: GetModulePaths(path, WithCurrentProject(), ScanDeep(), SkipNoGo())
- Old: FindModulePaths(path, options)
- New: GetModulePaths(path, ...Option)
- Old: GetProjectPath() returns (root, subpath, ok)
- New: GetProjectPath() returns (*ProjectPath, ok) with Root/SubPath fields
- New: GetProjectRoot() returns (root, ok) - simple root detection

Code Changes:
- Split workspath into works_path.go and options.go
- Add functional options: WithCurrentProject(), WithCurrentPackage(), ScanDeep(), SkipNoGo(), DebugMode(), WithDebug(bool)
- Add GetProjectRoot() function - returns project root path
- Add ProjectPath struct with Root and SubPath fields
- Rename internal functions: shouldSkip→isHidden, hasGoFiles→existsGoFiles
- Reduce package from ~270 lines to ~160 lines

CLI Changes:
- Remove command execution (worksexec/worksubcmd packages removed in previous commit)
- Default command: list module paths with JSON output
- Add version subcommand: list Go versions from go.mod files
- Add cobra.NoArgs to restrict arguments
- Use golang.org/x/mod/modfile to parse go.mod

Documentation and CI:
- Update README.md and README.zh.md with new API examples
- Update footer template to version 2025-11-25
- Add .github/workflows/release.yml with Go 1.22.x-1.25.x matrix
- Update Go version badge link to go.dev

Tests:
- Add tests: GetProjectPath, GetProjectRoot, GetModulePaths with options
- Add edge case tests: NotFound, RootIsModule, ScanDeep, SkipNoGo, NotModule
- Use setupTestProject/cleanupDIR test helpers

79 of 138 new or added lines in 3 files covered. (57.25%)

3 existing lines in 2 files now uncovered.

137 of 208 relevant lines covered (65.87%)

27.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
83.33
workspath/options.go
57
0.0
0.0% cmd/go-work/main.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
97.7
3.31% workspath/works_path.go
2
0.0
0.0% cmd/go-work/main.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.23.x - 20190688123.1 13 Dec 2025 10:21AM UTC 5
65.87
GitHub Action Run
2 Go-1.24.x - 20190688123.2 13 Dec 2025 10:22AM UTC 5
65.87
GitHub Action Run
3 Go-stable - 20190688123.3 13 Dec 2025 10:22AM UTC 5
65.87
GitHub Action Run
4 Go-1.25.x - 20190688123.4 13 Dec 2025 10:22AM UTC 5
65.87
GitHub Action Run
5 Go-1.22.x - 20190688123.5 13 Dec 2025 10:21AM UTC 5
65.87
GitHub Action Run
Source Files on build 20190688123
  • Tree
  • List 5
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0b75b0f7 on github
  • Prev Build on main (#18928945897)
  • 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