Skip to content

Conversation

@endorama
Copy link
Owner

@endorama endorama commented Jun 8, 2023

The cobra getting started uses Go init functions to initialise commands.

I dislike this practice, is not needed and leverages a pattern that creates trouble.

With this PRs the cmd package exposes commands through a exported functions, that are then built into a CLI by the main function.

@endorama endorama force-pushed the remove-cobra-init branch from 47f5d27 to fb6bd4e Compare June 8, 2023 16:50
@endorama endorama merged commit d7fa57e into main Jun 8, 2023
@endorama endorama deleted the remove-cobra-init branch June 8, 2023 16:50
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