gin icon indicating copy to clipboard operation
gin copied to clipboard

[Help] indirect require package [github.com/go-playground/locales] too big

Open Laotree opened this issue 1 year ago • 2 comments

Description

I use gin as my web framework. everytime I packup my binary file, in a pure container, it always cost too much time to download locales package since gin which less than 3M, requires locales indirectly, I repeatly download which more than 30M could gin remove locales or replace it with a smaller requirement?

go mod why github.com/go-playground/locales                                                                                                                                                         
# github.com/go-playground/locales
github.com/gin-gonic/gin/binding
github.com/go-playground/validator/v10
github.com/go-playground/universal-translator
github.com/go-playground/locales

Laotree avatar May 31 '22 07:05 Laotree

maybe commit issue to here: https://github.com/go-playground/validator/issues

thinkerou avatar Jun 07 '22 06:06 thinkerou

maybe commit issue to here: https://github.com/go-playground/validator/issues

Validation is self-defined in beego , so I think if there is a option for gin to build its own validation package? For now, it's not a graceful solution to require locales indirectly, considering its size and only used in validation. Strongly suggest you guys think about it.

Laotree avatar Jun 07 '22 10:06 Laotree