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 skel plugin for code sharing #473

Merged
merged 19 commits into from
Oct 25, 2024
Merged

add skel plugin for code sharing #473

merged 19 commits into from
Oct 25, 2024

Conversation

tg123
Copy link
Owner

@tg123 tg123 commented Oct 24, 2024

This pull request makes significant changes to the plugin system, particularly around the implementation of the SkelPlugin and the removal of redundant code. The most important changes include the creation of the SkelPlugin class, refactoring existing plugins to use SkelPlugin, and the removal of unnecessary methods and code.

Creation of SkelPlugin:

  • libplugin/skel.go: Introduced the SkelPlugin class with methods for creating configurations, handling password and public key callbacks, and verifying host keys.

Refactoring existing plugins:

  • plugin/docker/docker.go: Removed old methods and refactored the plugin to use SkelPlugin. This includes changes in the main function to utilize SkelPlugin for creating configurations. [1] [2] [3] [4]
  • plugin/kubernetes/kubernetes.go: Similar to the Docker plugin, the Kubernetes plugin was refactored to use SkelPlugin, and redundant methods were removed. [1] [2] [3] [4] [5]

Removal of redundant code:

  • .goreleaser.yaml: Removed the plugin_workingdirbykey build configuration as it is no longer needed.
  • plugin/docker/skel.go: Added a new file to support the Docker plugin's integration with SkelPlugin.
  • libplugin/util.go: Simplified the port parsing logic in SplitHostPortForSSH function.

These changes streamline the plugin architecture, making it more modular and easier to maintain.

libplugin/skel.go Fixed Show fixed Hide fixed
@tg123 tg123 marked this pull request as ready for review October 25, 2024 01:19
@tg123 tg123 merged commit 14ceadb into master Oct 25, 2024
4 checks passed
@tg123 tg123 deleted the baseplugin branch October 25, 2024 06:15
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.

1 participant