Gate embeddeddolt package on //go:build cgo with stub files for !cgo. Android and freebsd targets use CGO_ENABLED=0 since zig lacks sysroot headers for these platforms. Server mode still works on all targets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
325 B
Go
14 lines
325 B
Go
//go:build !cgo
|
|
|
|
package embeddeddolt
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
"errors"
|
|
)
|
|
|
|
// OpenSQL is a stub that returns an error when CGO is not enabled.
|
|
func OpenSQL(_ context.Context, _, _, _ string) (*sql.DB, func() error, error) {
|
|
return nil, nil, errors.New("embeddeddolt: requires CGO (build with CGO_ENABLED=1)")
|
|
}
|