Skip to content

fix(cli): detect a Gin project whose go.mod is one directory down - #17

Merged
Kidkender merged 1 commit into
mainfrom
fix/cli-go-subdir
Nov 13, 2026
Merged

Kidkender merged 1 commit into
mainfrom
fix/cli-go-subdir

Conversation

@Kidkender

Copy link
Copy Markdown
Owner

The CLI only treated a project as Go when go.mod sat at the root, and then asked isGinProject. analysis and the MCP server already rely on isGinProject alone, which also finds a go.mod one directory down (api/, server/) and returns false for a root that has composer.json. Such a project fell through to the Laravel default and showed no routes in archmind trace / findings.

Change

apps/cli/src/utils/parse-project.ts: detect Go with isGinProject(projectRoot), like the other entry points.

Verified on real projects

  • zgiai/zgi (go.mod in api/): Laravel, 0 routes → Go, 226 routes.
  • ginfast (go.mod at the root): unchanged, Go, 122 routes.
  • isGinProject is false for BookStack, koel, invoiceninja (Laravel), RuoYi, SpringBlade (Spring Boot), nestjs-boilerplate and bats-server (Express), so their detection is unchanged.

CI needs #12 merged first (the build on main fails on a clean checkout until then).

The CLI only treated a project as Go when go.mod sat at the root, then asked
isGinProject; analysis and the MCP server already rely on isGinProject alone,
which also finds a go.mod one directory down (api/, server/) and returns false
for a root that has composer.json. Such a project fell through to the Laravel
default and showed no routes.

On zgiai/zgi (go.mod in api/): Laravel, 0 routes → Go, 226 routes. ginfast
(go.mod at the root) unchanged; isGinProject is false for the Laravel, Spring
Boot, NestJS and Express projects checked.
@Kidkender Kidkender mentioned this pull request Nov 13, 2026
@Kidkender
Kidkender merged commit 78fd79e into main Nov 13, 2026
1 check failed
@Kidkender
Kidkender deleted the fix/cli-go-subdir branch November 13, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant