go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

For decimal types, use shopspring/decimal to replace float64.

Open taobig opened this issue 2 years ago • 3 comments

https://github.com/zeromicro/go-zero/issues/1994

taobig avatar Jul 04 '22 09:07 taobig

感谢你的 pr,decimal 这个是一个好问题,但是在代码生成我们不会直接引入三方包,这个最好把主动权交给用户,后期考虑出一个配置方案来解决这个问题。

Thanks for you contribution! That's an awesome solution for decimal, in my opinion, developer import the 3rd package for decimal is much more suite than goctl's code generation, to solve this problem, it's possible that we would provide a configuration to resolve it, thanks again!

kesonan avatar Jul 09 '22 15:07 kesonan

是否可以把decimal类型直接内置到框架中 这样就不需要引入第三方包了?

hinego avatar Jul 15 '22 06:07 hinego

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it possible to build the decimal type directly into the framework so that there is no need to introduce third-party packages?

Issues-translate-bot avatar Jul 15 '22 06:07 Issues-translate-bot