mirror of
https://github.com/netbirdio/dex.git
synced 2026-05-22 18:43:53 -07:00
5f91d4bed5
`ent` driver gives a normal error if the binary is compiled without CGO, but with our custom SQL driver Dex just fails to compile. ``` # github.com/dexidp/dex/cmd/dex cmd/dex/config.go:273:26: undefined: sql.SQLite3 cmd/dex/config.go:315:43: undefined: sql.SQLite3 ``` Signed-off-by: Maksim Nabokikh <maksim.nabokikh@flant.com> Signed-off-by: Maksim Nabokikh <max.nabokih@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
20 lines
430 B
Go
20 lines
430 B
Go
//go:build !cgo
|
|
// +build !cgo
|
|
|
|
// This is a stub for the no CGO compilation (CGO_ENABLED=0)
|
|
|
|
package sql
|
|
|
|
import (
|
|
"fmt"
|
|
"log/slog"
|
|
|
|
"github.com/dexidp/dex/storage"
|
|
)
|
|
|
|
type SQLite3 struct{}
|
|
|
|
func (s *SQLite3) Open(logger *slog.Logger) (storage.Storage, error) {
|
|
return nil, fmt.Errorf("SQLite storage is not available: binary compiled without CGO support. Recompile with CGO_ENABLED=1 or use a different storage backend.")
|
|
}
|