File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -156,14 +156,35 @@ vi ./config/setting.yml
156156# 2. 确认log路径
157157```
158158
159+ :::tip ⚠️注意 在windows环境如果没有安装中CGO,会出现这个问题;
160+
161+ ``` bash
162+ E:\g o-admin> go build
163+ # github.com/mattn/go-sqlite3
164+ cgo: exec /missing-cc: exec: " /missing-cc" : file does not exist
165+ ```
166+
167+ or
168+
169+ ``` bash
170+ D:\C ode\g o-admin> go build
171+ # github.com/mattn/go-sqlite3
172+ cgo: exec gcc: exec: " gcc" : executable file not found in %PATH%
173+ ```
174+
175+ [ 解决cgo问题进入] ( https://doc.go-admin.dev/guide/other/faq.html#_5-cgo-exec-missing-cc-exec-missing-cc-file-does-not-exist )
176+
177+ :::
178+
159179#### 初始化数据库,以及服务启动
180+
160181``` bash
161182# 首次配置需要初始化数据库资源信息
162183# macOS or linux 下使用
163184$ ./go-admin migrate -c=config/settings.dev.yml
164185
165186# ⚠️注意:windows 下使用
166- $ ./ go-admin.exe migrate -c=config/settings.dev.yml
187+ $ go-admin.exe migrate -c=config/settings.dev.yml
167188
168189
169190# 启动项目,也可以用IDE进行调试
@@ -172,7 +193,7 @@ $ ./go-admin server -c config/settings.yml
172193
173194
174195# ⚠️注意:windows 下使用
175- $ ./ go-admin.exe server -c config/settings.yml
196+ $ go-admin.exe server -c config/settings.yml
176197```
177198
178199#### 使用docker 编译启动
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ type Api struct {
1717 Logger * logger.Logger
1818}
1919
20- func (e Api ) SetContext (c * gin.Context ) {
20+ func (e * Api ) SetContext (c * gin.Context ) {
2121 e .Context = c
2222}
2323
You can’t perform that action at this time.
0 commit comments