comments cleanup

This commit is contained in:
crn4
2026-05-27 16:51:55 +02:00
parent 98818e3095
commit 21cfec93d4
16 changed files with 63 additions and 90 deletions
+3 -8
View File
@@ -7,14 +7,9 @@ import (
)
// newSQLite3 builds the dex SQLite3 config. CGO builds use the upstream
// struct that takes a File path. Non-CGO builds (see sqlite_nocgo.go) build
// the empty stub — `Open()` then returns the dex "SQLite not available"
// error, which is correct behaviour for binaries that can't link sqlite3.
//
// Wrapping the construction this way keeps the call sites in config.go /
// provider.go compilable under both build modes — the upstream stub for
// !cgo has no File field, so a bare `sql.SQLite3{File: file}` literal fails
// the cross-compile for targets like linux/arm/v6 in the release pipeline.
// struct that takes a File path. Non-CGO builds get an empty stub whose
// Open() returns the dex "SQLite not available" error — correct behaviour
// for binaries that can't link sqlite3 (e.g. cross-compiled ARM targets).
func newSQLite3(file string) *sql.SQLite3 {
return &sql.SQLite3{File: file}
}