cli_helpers

package module
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

README

Linolabx Cli Helper

github.com/linolabx/cli_helpers/command_helper

import "github.com/linolabx/cli_helpers/command_helper"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagHelperTest added in v0.0.16

func FlagHelperTest(arguments []string, plugin CommandPlugin, callback func())

Types

type CommandHelper added in v0.0.16

type CommandHelper struct {
	Command *cli.Command
	Plugins []CommandPlugin
	Action  func(cCtx *cli.Context) error
}

func (*CommandHelper) AddPlugin added in v0.0.16

func (this *CommandHelper) AddPlugin(plugin CommandPlugin)

func (*CommandHelper) GetCommand added in v0.0.16

func (this *CommandHelper) GetCommand() *cli.Command

type CommandPlugin added in v0.0.16

type CommandPlugin interface {
	HandleCommand(cmd *cli.Command) error
	HandleContext(cCtx *cli.Context) error
}

type FlagHelper

type FlagHelper struct {
	Prefix   string
	Name     string
	Category string
	Value    string
	Usage    string
	Required bool
	// contains filtered or unexported fields
}

func (*FlagHelper) GetEnvVar added in v0.0.16

func (this *FlagHelper) GetEnvVar() string

func (*FlagHelper) GetFlagName added in v0.0.16

func (this *FlagHelper) GetFlagName() string

func (*FlagHelper) StringFlag added in v0.0.16

func (this *FlagHelper) StringFlag() *cli.StringFlag

func (*FlagHelper) StringValue added in v0.0.16

func (this *FlagHelper) StringValue(cCtx *cli.Context) string

Directories

Path Synopsis
helpers module
plugins
_clickhouse Module
_es Module
_gin Module
_lotus Module
_mysql Module
_postgres Module
_postgress Module
_rabbitmq Module
_redis Module
_s3 Module

Jump to

Keyboard shortcuts

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