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

Add support for user defaults #92

Merged
merged 12 commits into from
Aug 16, 2022
Merged

Add support for user defaults #92

merged 12 commits into from
Aug 16, 2022

Conversation

snay2
Copy link
Contributor

@snay2 snay2 commented Aug 8, 2022

Issue #, if available: #75

Description of changes:

For each question in interactive mode, read the user default from ~/.simple-ec2/simple-ec2.json and prefer it to the system default wherever possible. This improves the user experience by suggesting defaults that they have previously chosen and thus may likely prefer now.

This code was originally written by @GavinBurris42, and we conducted reviews on their fork: GavinBurris42#7 and GavinBurris42#8, where Gavin addressed extensive feedback from the team. I authored two additional commits for this PR: 791ed73 (go mod tidy) and 051fe7c (refactor to extract a common function, error message wording clarification). This PR is to get the code into the main repo so we can release it publicly.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@snay2 snay2 requested a review from cjerad August 8, 2022 22:12
@snay2 snay2 requested a review from a team as a code owner August 8, 2022 22:12
Copy link

@cjerad cjerad left a comment

Choose a reason for hiding this comment

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

Looks good. A few questions, and some code-style nit picking (which you can ignore).

cmd/launch.go Outdated Show resolved Hide resolved
cmd/terminate.go Outdated Show resolved Hide resolved
pkg/question/question.go Show resolved Hide resolved
pkg/question/question.go Show resolved Hide resolved
pkg/question/question.go Show resolved Hide resolved
pkg/question/question.go Show resolved Hide resolved
pkg/question/question_test.go Outdated Show resolved Hide resolved
Copy link

@cjerad cjerad left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@snay2 snay2 merged commit ec44bbf into awslabs:main Aug 16, 2022
@snay2 snay2 deleted the userDefaults branch August 16, 2022 16:19
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