https://github.com/mudler/cobra-extensions
Create git-alike extensions for your cobra projects!
https://github.com/mudler/cobra-extensions
Last synced: 2 months ago
JSON representation
Create git-alike extensions for your cobra projects!
- Host: GitHub
- URL: https://github.com/mudler/cobra-extensions
- Owner: mudler
- Created: 2020-05-19T18:12:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T15:49:51.000Z (almost 5 years ago)
- Last Synced: 2025-02-02T07:43:26.311Z (4 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cobra-extensions
Create git-alike extensions for your cobra projects!## Usage
```
import "github.com/mudler/cobra-extensions"// Detect my-awesome-cli-foo, my-awesome-cli-bar in $PATH and extensiopath1 (relative to the bin)
// it also accepts abspath
exts := extensions.Discover("my-awesome-cli", "extensiopath1", "extensiopath2")fmt.Println("Detected extensions:", exts)
for _, ex := range exts {
name := ex.Short()
cobraCmd := ex.CobraCommand()
}
```