Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upEnvprofile auto-set in all console commands #244
Comments
This comment has been minimized.
This comment has been minimized.
@radutopala Thanks for bringing up the suggestion for framework improvements. I understand your proposed solution to add I will do my homework and get back to you. |
This comment has been minimized.
This comment has been minimized.
@radutopala I think, solution could be having a config to add # Application binary console command's configurations.
console {
# Convenient application binary flags configurations.
flags {
# Flag `envprofile`
envprofile {
# Add command/subcommand names into list to enable flag envprofile.
# Framework would initialize app configuration based on flag `envprofile` input
commands = ["cmd1", "cmd2", "cmd1.subcmd1", "cmd2.subcmd2"]
}
}
} Please have a look and let me know. I will schedule it for |
This comment has been minimized.
This comment has been minimized.
@jeevatkm And these config defined flags will be auto-set also in the root command? Even so, I don't think it's really necessary to have this level of abstraction. You would then need to be able to set different params in this configs entry for each flag, which I think should be done in code instead.
I think we just need a very simple solution here |
This comment has been minimized.
This comment has been minimized.
@radutopala Okay, lets start with simple design and could be improvised in the future. Solution is - Add |
radutopala commentedJan 16, 2019
•
edited
Envprofile should be transmitted automatically, somehow, to all Console commands.
This way we can avoid adding
to every command.
The commands are part of the built binary, so it makes sense to have the envprofile in all commands as well.
A solution would be to append the EnvProfile StringFlag to Flags, when the command is added in init.