commands

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prepare

func Prepare(root *cobra.Command)

Types

type Run

type Run struct{}

func (*Run) GetArgs

func (*Run) GetArgs() cobra.PositionalArgs

GetArgs return the args.

func (*Run) GetDescription

func (*Run) GetDescription() string

GetDescription returns the command description.

func (*Run) GetLongDescription

func (*Run) GetLongDescription() string

GetLongDescription returns the command long description.

func (*Run) GetRequiredFlags

func (*Run) GetRequiredFlags() []string

GetRequiredFlags returns the server required flags.

func (*Run) Info

func (*Run) Info() string

Info returns the command name.

func (*Run) Run

func (*Run) Run() RunCmd

Run executes the script associated to the command.

func (*Run) SetFlags

func (*Run) SetFlags(flags *pflag.FlagSet)

SetFlags set the available flags.

type RunCmd

type RunCmd func(cmd *cobra.Command, args []string)

type Server

type Server struct{}

func (*Server) GetArgs

func (*Server) GetArgs() cobra.PositionalArgs

GetArgs return the args.

func (*Server) GetDescription

func (*Server) GetDescription() string

GetDescription returns the command description.

func (*Server) GetLongDescription

func (*Server) GetLongDescription() string

GetLongDescription returns the command long description.

func (*Server) GetRequiredFlags

func (*Server) GetRequiredFlags() []string

GetRequiredFlags returns the server required flags.

func (*Server) Info

func (*Server) Info() string

Info returns the command name.

func (*Server) Run

func (s *Server) Run() RunCmd

Run executes the script associated to the command.

func (*Server) ServeHTTP

func (*Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP handle any request.

func (*Server) SetFlags

func (*Server) SetFlags(f *pflag.FlagSet)

SetFlags set the available flags.

Jump to

Keyboard shortcuts

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