Coder Social home page Coder Social logo

Comments (9)

Skyenought avatar Skyenought commented on July 26, 2024 1

image
通过添加 -service 参数, 或指定全局渲染参数中的相关值即可

from cloudwego.github.io.

li-jin-gou avatar li-jin-gou commented on July 26, 2024

参考 https://github.com/cloudwego/cwgo/blob/main/tpl/hertz/server/standard/layout.yaml#L515

from cloudwego.github.io.

li-jin-gou avatar li-jin-gou commented on July 26, 2024

image

看意思直接用就可以

from cloudwego.github.io.

xuyang404 avatar xuyang404 commented on July 26, 2024

image

看意思直接用就可以

package.yaml的router,go和register.go貌似没有这些参数

from cloudwego.github.io.

xuyang404 avatar xuyang404 commented on July 26, 2024

image 通过添加 -service 参数, 或指定全局渲染参数中的相关值即可

package.yaml的router,go和register.go貌似没有全局参数

from cloudwego.github.io.

Skyenought avatar Skyenought commented on July 26, 2024

@FGYFFFF 我发现 registry 好像是在一些方面写死了吗, 我在模版里添加的任何东西都无法被读取到

from cloudwego.github.io.

Skyenought avatar Skyenought commented on July 26, 2024

image 通过添加 -service 参数, 或指定全局渲染参数中的相关值即可

package.yaml的router,go和register.go貌似没有全局参数

router.go 是可以读取到的, 我试了一下

from cloudwego.github.io.

FGYFFFF avatar FGYFFFF commented on July 26, 2024

package.yaml的router,go和register.go貌似没有全

文档这块写的有些问题, router.go(https://github.com/cloudwego/hertz/blob/develop/cmd/hz/generator/router.go#L31)/register.go(https://github.com/cloudwego/hertz/blob/develop/cmd/hz/generator/router.go#L298) 用的参数不是文档里的那些参数,是运行时构建的参数。
不推荐修改路由相关的模板

from cloudwego.github.io.

Skyenought avatar Skyenought commented on July 26, 2024

@FGYFFFF 主要是我在 router.go 中修改模版是有效的, biz/route/register.go 感觉是干脆就不读取配置文件的 body 了

就是我发现 模版配置在 biz/router/register.go 好像是失效了?

from cloudwego.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.