You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the reading of labels relies on package gtag to perform some "magic" operations. For example, use gtag.Set to set some custom labels and read the set label contents in the struct tag by means of {xxx}. This approach is somewhat of a "hack" and not easy to maintain. When there are more labels, the code will look like this:
We can implement an automatic resource management function. We can set certain project management rules. Before compiling the source code to generate binary files, we can automatically perform the gf pack operation on the manifest/autopack directory. Of course, it should be noted that during the development stage, we need to directly read the label configuration contents from this directory instead of from the resource manager.
Subsequently, when configuring label contents, use the rule of {res:xxx} to indicate that the label content is read from the resource manager. The advantage of doing this is that it can excellently expand the capabilities of the struct tag, and it can support even very long label contents well.
Describe alternatives you've considered
no
Additional
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Option Yes
Describe the solution you'd like
Currently, the reading of labels relies on package
gtag
to perform some "magic" operations. For example, usegtag.Set
to set some custom labels and read the set label contents in thestruct tag
by means of{xxx}
. This approach is somewhat of a "hack" and not easy to maintain. When there are more labels, the code will look like this:gf/cmd/gf/internal/cmd/gendao/gendao.go
Line 30 in 817ac36
We can implement an automatic resource management function. We can set certain project management rules. Before compiling the source code to generate binary files, we can automatically perform the
gf pack
operation on themanifest/autopack
directory. Of course, it should be noted that during the development stage, we need to directly read the label configuration contents from this directory instead of from the resource manager.Subsequently, when configuring label contents, use the rule of
{res:xxx}
to indicate that the label content is read from the resource manager. The advantage of doing this is that it can excellently expand the capabilities of thestruct tag
, and it can support even very long label contents well.Describe alternatives you've considered
no
Additional
No response
The text was updated successfully, but these errors were encountered: