Added docs for adding and removing plugins
This commit is contained in:
@@ -178,7 +178,15 @@ p2prc --gen <project name> --mod <go module name>
|
|||||||
```
|
```
|
||||||
[read more about the generate module](GenerateImplementation.md)
|
[read more about the generate module](GenerateImplementation.md)
|
||||||
|
|
||||||
|
### Pulling plugin from a remote repo
|
||||||
|
```
|
||||||
|
p2prc --pp <repo link>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deleting plugin from the plugin directory
|
||||||
|
```
|
||||||
|
p2prc --rp <plugin name>
|
||||||
|
```
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@@ -133,3 +133,12 @@ After the port is automatically it's ready to run !
|
|||||||
|
|
||||||
### Sample plugins implemented:
|
### Sample plugins implemented:
|
||||||
- [VSCode Plugin](https://github.com/Akilan1999/p2prc-vscode-browser)
|
- [VSCode Plugin](https://github.com/Akilan1999/p2prc-vscode-browser)
|
||||||
|
|
||||||
|
## Pull Plugins
|
||||||
|
The following allows us to pull plugins from a remote git repository and store them
|
||||||
|
in the default plugins directory. The implementation uses a Go git library to pull the
|
||||||
|
git repo and automatically save it as a folder in the plugin path.
|
||||||
|
|
||||||
|
## Delete Plugins
|
||||||
|
We delete the plugin folder based on the plugin name provided as an argument on the cli command.
|
||||||
|
Once the folder is deleted, the plugin manager automatically knows that the plugin does not exist anymore.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// DownloadPlugin This functions downloads package from
|
// DownloadPlugin This functions downloads package from
|
||||||
// a git repo
|
// a git repo.
|
||||||
func DownloadPlugin(pluginurl string) error {
|
func DownloadPlugin(pluginurl string) error {
|
||||||
// paring plugin url
|
// paring plugin url
|
||||||
u, err := url.Parse(pluginurl)
|
u, err := url.Parse(pluginurl)
|
||||||
@@ -42,6 +42,8 @@ func DownloadPlugin(pluginurl string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeletePlugin The following function deletes a plugin based on
|
||||||
|
// the plugin name provided.
|
||||||
func DeletePlugin(pluginname string) error {
|
func DeletePlugin(pluginname string) error {
|
||||||
config, err := config.ConfigInit()
|
config, err := config.ConfigInit()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user