/
githubmirror
/
sqlc
Обзор
Документация
Войти
/
githubmirror
/
sqlc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/sqltest/native/enabled.go
20 строк
525 B
Kyle Gray
feat: add native database support for e2e tests without Docker (#4236)
18 дек 2025, 22:10
Не верифицирован
18 дек 2025, 22:10
53b12f9
Код
Авторство
О чём код?
package native import ( "fmt" "os/exec" "runtime" ) // Supported returns nil if native database installation is supported on this platform. // Currently only Linux (Ubuntu/Debian) is supported. func Supported() error { if runtime.GOOS != "linux" { return fmt.Errorf("native database installation only supported on linux, got %s", runtime.GOOS) } // Check if apt-get is available (Debian/Ubuntu) if _, err := exec.LookPath("apt-get"); err != nil { return fmt.Errorf("apt-get not found: %w", err) } return nil }