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

feat: support default resources in config #286

Merged
merged 4 commits into from
May 15, 2024
Merged

Conversation

dbolson
Copy link
Contributor

@dbolson dbolson commented May 15, 2024

Config file supports new keys.

ldcli config --set environment production
ldcli config --set flag my-flag
ldcli config --set project default

Running ldcli config --list returns

environment: production
flag: my-new-flag
project: default

Now commands that require these flags can use the values in the config file:

ldcli flags get # uses --project and --flag
ldcli environments get # uses --environment

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

} {
sb.WriteString(fmt.Sprintf("- `%s`: %s\n", s, cliflags.AllFlagsHelp()[s]))

for flag, description := range cliflags.AllFlagsHelp() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we don't need to change this part when adding a new config field.

@dbolson dbolson requested a review from k3llymariee May 15, 2024 17:06
Copy link
Contributor

@k3llymariee k3llymariee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@dbolson dbolson merged commit afa9142 into main May 15, 2024
2 checks passed
@dbolson dbolson deleted the sc-243757/default-resources branch May 15, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants