Browse Source

测试远程仓库连接

wangguixi/feature-20251107144650-股票知识测评
wangguixi 2 months ago
parent
commit
c50c45d74b
  1. 31
      Knowledge_Test_Go/hack/config.yaml
  2. 8
      Knowledge_Test_Go/internal/cmd/cmd.go

31
Knowledge_Test_Go/hack/config.yaml

@ -1,13 +1,20 @@
# https://goframe.org/docs/web/server-config-file-template
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
# https://goframe.org/docs/core/glog-config
logger:
level : "all"
stdout: true
# https://goframe.org/docs/core/gdb-config-file
database:
default:
debug: true
link: "mysql:root:123456@tcp(127.0.0.1:3306)/练习1?loc=Local&parseTime=true"
# CLI tool, only in development environment.
# https://goframe.org/docs/cli
gfcli:
gen:
dao:
- link: "mysql:root:12345678@tcp(127.0.0.1:3306)/test"
descriptionTag: true
docker:
build: "-a amd64 -s linux -p temp -ew"
tagPrefixes:
- my.image.pub/my-app

8
Knowledge_Test_Go/internal/cmd/cmd.go

@ -17,7 +17,13 @@ var (
Brief: "start http server",
Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
s.Group("/api", func(group *ghttp.RouterGroup) {
group.Middleware(ghttp.MiddlewareHandlerResponse)
group.Bind(
hello.NewV1(),
)
})
s.Group("/admin", func(group *ghttp.RouterGroup) {
group.Middleware(ghttp.MiddlewareHandlerResponse)
group.Bind(
hello.NewV1(),

Loading…
Cancel
Save