Files
luet/vendor/github.com/mudler/cobra-extensions
mudler c2e751ba98 ⬆️ Update vendor
2023-02-02 10:19:53 +01:00
..
2020-06-12 17:58:13 +02:00
2020-06-12 17:58:13 +02:00
2020-06-12 17:58:13 +02:00
2020-06-12 17:58:13 +02:00
2020-06-12 17:58:13 +02:00
2020-06-12 17:58:13 +02:00

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()
}