Supported returns nil if native database installation is supported on this platform. Currently only Linux (Ubuntu/Debian) is supported.
()
| 9 | // Supported returns nil if native database installation is supported on this platform. |
| 10 | // Currently only Linux (Ubuntu/Debian) is supported. |
| 11 | func Supported() error { |
| 12 | if runtime.GOOS != "linux" { |
| 13 | return fmt.Errorf("native database installation only supported on linux, got %s", runtime.GOOS) |
| 14 | } |
| 15 | // Check if apt-get is available (Debian/Ubuntu) |
| 16 | if _, err := exec.LookPath("apt-get"); err != nil { |
| 17 | return fmt.Errorf("apt-get not found: %w", err) |
| 18 | } |
| 19 | return nil |
| 20 | } |
no outgoing calls