cobraplugin

package module
v0.0.0-...-6e289e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 12 Imported by: 0

README

Plugins command for Cobra

GitHub Releases Build Status codecov Go Report Card GoDevDoc Donate

TBD

Prerequisites

  • Go >= 1.16

Install

go get github.com/nhatthm/cobra-plugin

Usage

TBD

Examples

TBA

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Paypal donation

paypal

       or scan this

Documentation

Overview

Package cobraplugin provides plugins for cobra command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	registry.Registry
	// contains filtered or unexported fields
}

Registry is a wrapper around registry.Registry.

func NewCommand

func NewCommand(path string, options ...registry.Option) (*cobra.Command, *Registry, error)

NewCommand creates a new plugin command.

func NewRegistry

func NewRegistry(path string, options ...registry.Option) (*Registry, error)

NewRegistry initiates a new Registry.

func (*Registry) Command

func (r *Registry) Command(pluginName string, args ...string) (*exec.Cmd, error)

Command returns a new exec.Command from the plugin name.

func (*Registry) PluginRegistry

func (r *Registry) PluginRegistry() registry.Registry

PluginRegistry provides registry.Registry service.

func (*Registry) Plugins

func (r *Registry) Plugins() (plugin.Plugins, error)

Plugins returns a list of plugins.

Directories

Path Synopsis
features
bootstrap
Package bootstrap provides integration tests.
Package bootstrap provides integration tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL