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

chore: Remove init() #35

Merged
merged 3 commits into from
Mar 19, 2024
Merged

chore: Remove init() #35

merged 3 commits into from
Mar 19, 2024

Conversation

dbolson
Copy link
Contributor

@dbolson dbolson commented Mar 19, 2024

Removes the init() function because it's too magic.

@dbolson dbolson force-pushed the refactor-root-cmd branch from ae05115 to 7751b73 Compare March 19, 2024 18:38
errors.Is(err, errs.ErrUnauthorized):
fmt.Fprintln(os.Stderr, err.Error())
default:
fmt.Println(err.Error())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sneaking this in here: removes the error prefix "Error: " for messages for consistency with the more specific error strings above.

Short: "LaunchDarkly CLI",
Long: "LaunchDarkly CLI to control your feature flags",
Version: "0.0.1", // TODO: set this based on release or use `cmd.SetVersionTemplate(s string)`
func newRootCommand() *cobra.Command {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Everything in init() is now in this constructor function.

@dbolson dbolson changed the title Remove init() chore: Remove init() Mar 19, 2024
@dbolson dbolson merged commit a0b43c3 into main Mar 19, 2024
2 checks passed
@dbolson dbolson deleted the refactor-root-cmd branch March 19, 2024 20:23
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