GoAdminGroup / go-admin

A golang framework helps gopher to build a data visualization and admin panel in ten minutes
https://www.go-admin.com
Apache License 2.0
7.98k stars 1.3k forks source link

[BUG] can't evaluate field MaxIdleCon in type config.Database #617

Open forloop163 opened 2 months ago

forloop163 commented 2 months ago

adm init web GoAdmin web install program start.

2024/04/28 11:19:32 http: panic serving [::1]:59617: template: project:18:29: executing "project" at <$database.MaxIdleCon>: can't evaluate field MaxIdleCon in type config.Database goroutine 21 [running]: net/http.(conn).serve.func1() /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:1868 +0xb0 panic({0x10151edc0?, 0x14000387e40?}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/runtime/panic.go:920 +0x26c main.checkError(...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:30 main.parseFile({0x140003bf980, 0x1873}, {0x101557ee0, 0x140002e6800}) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:108 +0x248 main.writeFileOfInstallation({{0x1012e9c0b, 0xc}, {0x140002ac150, 0x12}, {0x101557ee0, 0x140002e6800}, 0x1a4, 0x0, 0x1}) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:163 +0xf0 main.writeFilesOfInstallation({0x14000344000?, 0xa, 0x140002fc39b?}) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:172 +0x9c main.installProjectTmpl({{0x140002fc3a8, 0x4}, {0x140002fc372, 0x5}, {0x140002fc372, 0x5}, {0x140002fc3b4, 0x5}, {0x140002fc39b, 0x2}, ...}, ...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project.go:282 +0x1198 main.buildProjectWeb.func1.3({0x101588910, 0x140002ba0e0}, 0x14000296300) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project_web.go:229 +0x12d0 net/http.HandlerFunc.ServeHTTP(0x140002953ac?, {0x101588910?, 0x140002ba0e0?}, 0x1400019baf0?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2136 +0x38 net/http.(ServeMux).ServeHTTP(0x10?, {0x101588910, 0x140002ba0e0}, 0x14000296300) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2514 +0x144 net/http.serverHandler.ServeHTTP({0x1015867c0?}, {0x101588910?, 0x140002ba0e0?}, 0x6?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2938 +0xbc net/http.(conn).serve(0x14000246090, {0x10158aaa0, 0x140001adb30}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2009 +0x518 created by net/http.(Server).Serve in goroutine 19 /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:3086 +0x4cc 2024/04/28 11:19:32 http: panic serving [::1]:59618: mkdir pages: file exists goroutine 22 [running]: net/http.(conn).serve.func1() /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:1868 +0xb0 panic({0x1014e9240?, 0x140000be1e0?}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/runtime/panic.go:920 +0x26c main.checkError(...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:30 main.mkdirs(...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:92 main.installProjectTmpl({{0x140000ec0e8, 0x4}, {0x140000ec0b2, 0x5}, {0x0, 0x0}, {0x140000ec0f4, 0x5}, {0x140000ec0db, 0x2}, ...}, ...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project.go:252 +0x11c8 main.buildProjectWeb.func1.3({0x101588910, 0x140000dc000}, 0x1400021ea00) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project_web.go:229 +0x12d0 net/http.HandlerFunc.ServeHTTP(0x140000d202c?, {0x101588910?, 0x140000dc000?}, 0x14000081af0?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2136 +0x38 net/http.(ServeMux).ServeHTTP(0x10?, {0x101588910, 0x140000dc000}, 0x1400021ea00) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2514 +0x144 net/http.serverHandler.ServeHTTP({0x1015867c0?}, {0x101588910?, 0x140000dc000?}, 0x6?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2938 +0xbc net/http.(conn).serve(0x14000246120, {0x10158aaa0, 0x140001adb30}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2009 +0x518 created by net/http.(Server).Serve in goroutine 19 /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:3086 +0x4cc 2024/04/28 11:19:32 http: panic serving [::1]:59765: mkdir pages: file exists goroutine 5 [running]: net/http.(conn).serve.func1() /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:1868 +0xb0 panic({0x1014e9240?, 0x14000032300?}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/runtime/panic.go:920 +0x26c main.checkError(...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:30 main.mkdirs(...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/helper.go:92 main.installProjectTmpl({{0x140004120e8, 0x4}, {0x140004120b2, 0x5}, {0x0, 0x0}, {0x140004120f4, 0x5}, {0x140004120db, 0x2}, ...}, ...) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project.go:252 +0x11c8 main.buildProjectWeb.func1.3({0x101588910, 0x1400040a000}, 0x14000400000) /Users/janden/GolandProjects/pkg/mod/github.com/!go!admin!group/adm@v1.2.28/project_web.go:229 +0x12d0 net/http.HandlerFunc.ServeHTTP(0x1400007c0ac?, {0x101588910?, 0x1400040a000?}, 0x14000085af0?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2136 +0x38 net/http.(ServeMux).ServeHTTP(0x10?, {0x101588910, 0x1400040a000}, 0x14000400000) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2514 +0x144 net/http.serverHandler.ServeHTTP({0x1015867c0?}, {0x101588910?, 0x1400040a000?}, 0x6?) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2938 +0xbc net/http.(conn).serve(0x14000358000, {0x10158aaa0, 0x140001adb30}) /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:2009 +0x518 created by net/http.(Server).Serve in goroutine 19 /opt/homebrew/Cellar/go@1.21/1.21.9/libexec/src/net/http/server.go:3086 +0x4cc

punkrocker commented 1 month ago

I think this is a bug in new version. You can download binary file from here:https://book.go-admin.cn/en/install I tried this and resolved it

chenhg5 commented 1 month ago

@forloop163 @punkrocker @fanshuai @kurtesy Please try the new version v1.2.29. go install github.com/GoAdminGroup/adm@v1.2.29. Any questions are welcome to me, thx!

punkrocker commented 1 month ago

@forloop163 @punkrocker @fanshuai @kurtesy Please try the new version v1.2.29. go install github.com/GoAdminGroup/adm@v1.2.29. Any questions are welcome to me, thx!

好使了 thx