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

Use the specific config structure for each command #192

Closed
alonlong opened this issue May 16, 2021 · 0 comments · Fixed by #208
Closed

Use the specific config structure for each command #192

alonlong opened this issue May 16, 2021 · 0 comments · Fixed by #208
Assignees
Labels

Comments

@alonlong
Copy link
Contributor

Now there are different flagsets for different commands, but for each command, it uses a global config structure:

type Config struct {
    Version bool
    Agent     Agent     `skip:“true”`
    Server    Server    `skip:“true”`
    Convert   Convert   `skip:“true”`
    Exec      Exec      `skip:“true”`
    DbManager DbManager `skip:“true”`
}

just like the server command, the function is like this:

func startServer(cfg *config.Config)

i think it's better to use its own config for each command, the function should be like this:

func startServer(cfg *config.Server)
@AdrK AdrK linked a pull request May 22, 2021 that will close this issue
petethepig added a commit that referenced this issue May 25, 2021
Co-authored-by: kurylak <adrian.kurylak@nokia.com>
Co-authored-by: Dmitry Filimonov <dmitry@pyroscope.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants