## 背景
在 `dev-ac6ef06` 构建中,安装 SQL Server 等可选驱动时,GoNavi 在部分 macOS 环境会误报“当前环境未安装
Go”。
实际问题并非未安装 Go,而是应用从图形界面启动时没有继承终端中的 PATH,导致 `brew` 安装的 Go(如
`/opt/homebrew/bin/go`)无法被 `exec.LookPath("go")` 发现,进而阻塞可选驱动代理的本地构建流程。
材料参考:
<img width="2142" height="1460" alt="连接失败"
src="https://github.com/user-attachments/assets/0844cf97-5720-4677-a806-65e056fa9766"
/>
<img width="289" height="74" alt="image"
src="https://github.com/user-attachments/assets/3e98e482-f74d-4b68-8605-b712fbdb98c1"
/>
## 关键修改
- 为可选驱动源码构建新增 `go` 可执行文件解析逻辑,避免仅依赖当前进程 PATH
- 增加常见 Go 安装路径兜底:
- `/opt/homebrew/bin/go`
- `/usr/local/go/bin/go`
- `/usr/local/bin/go`
- 在常见路径未命中时,再回退到登录 shell 中执行 `command -v go`
- 解析 shell 输出时逐行筛选真实存在的路径,避免 shell 启动脚本输出额外提示导致误判
- 为 Go 探测逻辑补充单元测试,覆盖:
- shell 列表去重与顺序
- 常见路径回退
- shell 回退
- 噪音输出过滤
## 影响范围
- 仅影响可选驱动代理的源码构建阶段
- 不影响已内置驱动
- 不影响普通数据库连接、前端界面和其他业务逻辑
- 主要改善 macOS 图形界面启动应用时的 Go 环境探测兼容性
## 验证方式
已执行:
```bash
go test ./internal/app
```
## 修复效果
<img width="1114" height="784" alt="已连接1"
src="https://github.com/user-attachments/assets/72f4bb89-6c0b-4632-9098-3ce5b865e288"
/>
<img width="1032" height="791" alt="已连接2"
src="https://github.com/user-attachments/assets/6330cff2-c13b-4a9b-852d-8fc234819f81"
/>
## 验证点:
- 终端内已安装 Go 且可执行时,保持现有行为
- GUI 进程未继承 PATH 时,可通过常见目录或 shell 回退找到 Go
- shell 启动脚本存在额外输出时,仍可解析到真实 Go 路径
## 风险与回滚
### 风险:
- 仅新增本地命令探测与路径兜底逻辑,影响面较小
- 若用户使用非常规 Go 安装方式,仍可能需要后续补充手动指定 Go 路径的正式方案
### 回滚:
- 可直接回退本 PR 中 internal/app/methods_driver.go 与对应测试变更
## 备注
当前使用中还观察到“驱动下载链路域名不可达”在已有网络代理时可能出现误报,但该问题既不影响当前 PATH
修复的有效性,也并不阻塞下载,所以未纳入本次修改范围。
GoNavi - A Modern Lightweight Database Client
Language: English | 简体中文
GoNavi is a modern, high-performance, cross-platform database client built with Wails (Go) and React. It delivers native-like responsiveness with low resource usage.
Compared with many Electron-based clients, GoNavi is typically smaller in binary size (around 10MB class), starts faster, and uses less memory.
Project Overview
GoNavi is designed for developers and DBAs who need a unified desktop experience across multiple databases.
- Native-performance architecture: Wails (Go + WebView) with lightweight runtime overhead.
- Large dataset usability: virtualized rendering and optimized DataGrid workflows for high-volume tables.
- Unified connectivity: URI build/parse, SSH tunnel, proxy support, and on-demand driver activation.
- Production-oriented workflow: SQL editor, object management, batch export/backup, sync tools, execution logs, and update checks.
Supported Data Sources
Built-in: available out of the box.
Optional driver agent: install/enable via Driver Manager first.
| Category | Data Source | Driver Mode | Typical Capabilities |
|---|---|---|---|
| Relational | MySQL | Built-in | Schema browsing, SQL query, data editing, export/backup |
| Relational | PostgreSQL | Built-in | Schema browsing, SQL query, data editing, object management |
| Relational | Oracle | Built-in | Query execution, object browsing, data editing |
| Cache | Redis | Built-in | Key browsing, command execution, encoding/view switch |
| Relational | MariaDB | Optional driver agent | Querying, object management, data editing |
| Relational | Doris | Optional driver agent | Querying, object browsing, SQL execution |
| Search | Sphinx | Optional driver agent | SphinxQL querying and object browsing |
| Relational | SQL Server | Optional driver agent | Schema browsing, SQL query, object management |
| File-based | SQLite | Optional driver agent | Local DB browsing, editing, export |
| File-based | DuckDB | Optional driver agent | Large-table query, pagination, file-DB workflow |
| Domestic DB | Dameng | Optional driver agent | Querying, object browsing, data editing |
| Domestic DB | Kingbase | Optional driver agent | Querying, object browsing, data editing |
| Domestic DB | HighGo | Optional driver agent | Querying, object browsing, data editing |
| Domestic DB | Vastbase | Optional driver agent | Querying, object browsing, data editing |
| Document | MongoDB | Optional driver agent | Document query, collection browsing, connection management |
| Time-series | TDengine | Optional driver agent | Time-series schema browsing and querying |
| Columnar Analytics | ClickHouse | Optional driver agent | Analytical query, object browsing, SQL execution |
| Extensibility | Custom Driver/DSN | Custom | Extend to more data sources via Driver + DSN |
📸 Screenshots
Key Features
AI Assistant (New)
- Multi-provider Support: OpenAI, Google Gemini, Anthropic Claude, and custom API support.
- Context-Aware Chat: Attach table schemas to the AI context for accurate SQL generation and assistance.
- Slash Commands: Quick commands for generating SQL, explaining queries, optimizing performance, and reviewing schema designs.
Performance
- Smooth interaction under load: optimized table interaction (including column resize workflow on large datasets).
- Virtualized rendering: keeps large result sets responsive.
Data Management (DataGrid)
- In-place cell editing.
- Batch insert/update/delete with transaction-oriented submit/rollback.
- Large-field popup editor.
- Context actions (set NULL, copy/export, etc.).
- Smart read/write mode switching based on query context.
- Export formats: CSV, Excel (XLSX), JSON, Markdown.
SQL Editor
- Monaco Editor core.
- Context-aware completion for databases/tables/columns.
- Multi-tab query workflow.
Batch Export / Backup
- Database-level and table-level batch export/backup.
- Scope-aware operation flow to reduce mistakes.
Connectivity
- URI generation/parsing.
- SSH tunnel support.
- Proxy support.
- Config import/export (JSON).
- Optional driver management and activation.
Redis Tools
- Multi-view value rendering (auto/raw text/UTF-8/hex).
- Built-in command execution panel.
Observability and Update
- SQL execution logs with timing information.
- Startup/scheduled/manual update checks.
UI/UX
- Ant Design 5 based interface.
- Light/Dark themes.
- Flexible sidebar and layout behavior.
Tech Stack
- Backend: Go 1.24 + Wails v2
- Frontend: React 18 + TypeScript + Vite
- UI: Ant Design 5
- State Management: Zustand
- Editor: Monaco Editor
Installation and Run
Prerequisites
Development Mode
# Clone
git clone https://github.com/Syngnat/GoNavi.git
cd GoNavi
# Start development with hot reload
wails dev
Build
# Build for current platform
wails build
# Clean build (recommended before release)
wails build -clean
Artifacts are generated in build/bin.
Cross-Platform Release (GitHub Actions)
The repository includes a release workflow.
Push a v* tag to trigger automated build and release.
Release notes are generated automatically from merged pull requests and categorized by .github/release.yaml.
Target artifacts include:
- macOS (AMD64 / ARM64)
- Windows (AMD64)
- Linux (AMD64, WebKitGTK 4.0 and 4.1 variants)
Troubleshooting
macOS: "App is damaged and can’t be opened"
Without Apple notarization, Gatekeeper may block startup.
- Move
GoNavi.appto Applications. - Open Terminal.
- Run:
sudo xattr -rd com.apple.quarantine /Applications/GoNavi.app
Or right-click the app in Finder and choose Open with Control key flow.
Linux: missing libwebkit2gtk / libjavascriptcoregtk
GoNavi depends on WebKitGTK runtime libraries.
# Debian 13 / Ubuntu 24.04+
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.1-0 libjavascriptcoregtk-4.1-0
# Ubuntu 22.04 / Debian 12
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libwebkit2gtk-4.0-37 libjavascriptcoregtk-4.0-18
If you use Linux artifacts with the -WebKit41 suffix, prefer Debian 13 / Ubuntu 24.04+.
Contributing
Issues and pull requests are welcome.
For the full workflow, branch model, and maintainer sync rules, see:
External contributors should open pull requests directly against main.
Star History
Links
License
Licensed under Apache-2.0.