# go: parsing go.mod: unexpected module path "github.com/foo/bar" at line 3: missing module declaration

- **ID:** `go/malformed-go-mod`
- **Domain:** go
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

go.mod file is malformed, often due to improper manual editing or merging conflicts, missing the 'module' directive.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.12 | active | — | — |
| 1.18 | active | — | — |

## Workarounds

1. **** (75% success)
   ```
   Add 'module github.com/your/project' at the first line, then run go mod tidy
   ```
2. **** (95% success)
   ```
   git checkout go.mod
   ```

## Dead Ends

- **** — The module path must match the import paths used; a wrong path causes unresolved imports. (80% fail)
- **** — This will overwrite the file, losing all existing require statements. (60% fail)
