Refactor Gemini protocol implementation and improve server architecture

- Move gemini URL parsing from common/ to gemini/ package
- Add structured status codes in gemini/status_codes.go
- Improve error handling with proper Gemini status codes
- Update configuration field naming (Listen -> ListenAddr)
- Add UTF-8 validation for URLs
- Enhance security with better path validation
- Add CLAUDE.md for development guidance
- Include example content in srv/ directory
- Update build system to use standard shell
This commit is contained in:
antanst
2025-06-06 15:02:25 +03:00
parent a426edb1f6
commit 2ead66f012
10 changed files with 174 additions and 36 deletions

10
go.mod
View File

@@ -2,12 +2,20 @@ module gemserve
go 1.24.3
toolchain go1.24.4
require (
git.antanst.com/antanst/logging v0.0.1
git.antanst.com/antanst/xerrors v0.0.1
git.antanst.com/antanst/uid v0.0.1
git.antanst.com/antanst/xerrors v0.0.1
github.com/gabriel-vasile/mimetype v1.4.8
github.com/matoous/go-nanoid/v2 v2.1.0
)
require golang.org/x/net v0.33.0 // indirect
replace git.antanst.com/antanst/xerrors => ../xerrors
replace git.antanst.com/antanst/uid => ../uid
replace git.antanst.com/antanst/logging => ../logging