Skip to content

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

Open
@gqcn

Description

@gqcn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureplannedThis issue/proposal is planned into our next steps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions