We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
建议把open_sqlite3.go的功能启用,第一次下载[go-admin]想在本地测试一下,发现sqlite3功能不可用。报错:
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10.......]
调试了一下发现是go-admin-core@v1.5.2-0.20231103105356-84418ed9252c/tools/database/config.go,中的db, err := gorm.Open(open(e.dsn), config)部分使用的是open.go的代码没有引进sqlite驱动,其实open_sqlite3.go可以用的,可能会有些新手使用默认配置一直报错,排查花费时间
The text was updated successfully, but these errors were encountered:
sqlite3 数据库初始化失败 尝试CGO_ENABLED=1 go run -tags sqlite3 main.go migrate -c config/settings.sqlite.yml 可以解决
Sorry, something went wrong.
补充下,如果是生成可执行文件,编译时加上 -tags $ go build -tags sqlite3
编译(在linux环境下)生成 go-admin,然后, 初始化数据库: $ ./go-admin migrate -c config/settings.sqlite.yml 运行服务: $ ./go-admin server -c config/settings.sqlite.yml
以上是针对使用sqlite数据库的情况
No branches or pull requests
建议把open_sqlite3.go的功能启用,第一次下载[go-admin]想在本地测试一下,发现sqlite3功能不可用。报错:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10.......]
调试了一下发现是go-admin-core@v1.5.2-0.20231103105356-84418ed9252c/tools/database/config.go,中的db, err := gorm.Open(open(e.dsn), config)部分使用的是open.go的代码没有引进sqlite驱动,其实open_sqlite3.go可以用的,可能会有些新手使用默认配置一直报错,排查花费时间
The text was updated successfully, but these errors were encountered: