Technical notes on web development, DevOps, and AI integration.
1 article
A wrong package clause on a moved Go test file still passes go build, go vet, and go test. The import-binding rule behind it, and the procedural guard.
TL;DR: Moving a Go test file to a new directory silently broke its package clause: it still said package servicetype instead of servicetype_test. The build stayed green because unaliased imports share the import's name, so every servicetype.X call hit the import legally. Lesson: after relocating tests, manually check the package clause on line one, since tooling won't catch it.