Skip to content

feat: add rich go templates for new plugins - #56

Open
Atharva-Ramawat wants to merge 1 commit into
pipe-cd:mainfrom
Atharva-Ramawat:feature/rich-plugin-templates
Open

Atharva-Ramawat wants to merge 1 commit into
pipe-cd:mainfrom
Atharva-Ramawat:feature/rich-plugin-templates

Conversation

@Atharva-Ramawat

Copy link
Copy Markdown

What this PR does

This PR enhances hack/init-plugin.sh by generating starter Go templates when scaffolding a new community plugin:

  • Generates main.go with entrypoint execution via plugin.Run(&deployment.Plugin{}).
  • Generates deployment/plugin.go defining the Plugin struct implementing the plugin.DeploymentPlugin interface along with Name() and Version() method stubs.

Why we need it / Without this PR, what is the problem?

Previously, hack/init-plugin.sh only scaffolded the README.md, Makefile, and a temporary go.mod. Plugin developers had to manually write the initial Go boilerplate files from scratch before implementing their logic. Adding these starter templates streamlines the initial setup process.

Which issue(s) this PR fixes

Fixes #18

Signed-off-by: Atharva_Ramawat <atharvaramawat027@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rich go template files in init/plugin

1 participant