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

Playground: Plugin Library #2216

Draft
wants to merge 4 commits into
base: release/v1
Choose a base branch
from

Conversation

carolynvs
Copy link
Member

I'm playing around with making a library for making plugins so that people don't have to implement the boilerplate stuff.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@getporterbot getporterbot added this to In Progress in Porter and Mixins Jun 30, 2022
@carolynvs carolynvs added the playground 🙈 Pull request to try stuff out and see if it builds. Don't look! label Jun 30, 2022
@carolynvs
Copy link
Member Author

This is the new tiny main function for porter, and it would look the same for a plugin

func main() {
	ctx := context.Background()
	app := porter.New()
	rootCmd := buildRootCommandFrom(app)

	cli.Main(ctx, rootCmd, app)
}

It shoves in all the logic we have for telemetry, context cancellation, panic handling, etc into this new package pkg/cli

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
playground 🙈 Pull request to try stuff out and see if it builds. Don't look!
Projects
Porter and Mixins
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant