Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/gres: using the gres resource management component to improve the logic of reading label contents #4063

Open
gqcn opened this issue Dec 19, 2024 · 0 comments
Labels
feature planned This issue/proposal is planned into our next steps.

Comments

@gqcn
Copy link
Member

gqcn commented Dec 19, 2024

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, 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:

CGenDaoConfig = `gfcli.gen.dao`

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

@gqcn gqcn added feature planned This issue/proposal is planned into our next steps. labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature planned This issue/proposal is planned into our next steps.
Projects
None yet
Development

No branches or pull requests

1 participant