feat: Eliminate CGO dependency by switching to pure Go SQLite
Replaced github.com/mattn/go-sqlite3 (CGO-based) with modernc.org/sqlite (pure Go implementation) to enable CGO-free builds while maintaining full SQLite functionality. Benefits: - ✅ Cross-compilation without C compiler requirements - ✅ Simplified build environment (no CGO_ENABLED=1) - ✅ Reduced deployment dependencies - ✅ Easier container builds and static linking - ✅ Full SQLite compatibility maintained Changes: - Updated go.mod to use modernc.org/sqlite v1.34.4 - Updated database import to use pure Go SQLite driver - Removed CGO_ENABLED=1 from all Makefile build targets - Verified all binaries (skyview, beast-dump, skyview-data) build successfully The modernc.org/sqlite package is a cgo-free port of SQLite that transpiles the original C code to Go, providing identical functionality without CGO. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
9381ca8f8d
commit
41c7758f69
4 changed files with 70 additions and 7 deletions
|
|
@ -14,7 +14,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3" // SQLite driver
|
||||
_ "modernc.org/sqlite" // Pure Go SQLite driver (CGO-free)
|
||||
)
|
||||
|
||||
// Database represents the main database connection and operations
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue