Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultMessage = "Paused... press \"enter\" to continue."
)

Functions

func AddCommands

func AddCommands()

func DisplayConfiguration added in v1.4.4

func DisplayConfiguration(filter func(string, interface{}) bool)

func DisplayGlobals

func DisplayGlobals(filter func(string, interface{}) bool)

func MakeVariableFilter

func MakeVariableFilter(filterArgs ...string) func(string, interface{}) bool

Types

type AliasCommand

type AliasCommand struct {
}

func NewAliasCommand

func NewAliasCommand() *AliasCommand

func (*AliasCommand) AddOptions

func (cmd *AliasCommand) AddOptions(set shell.CmdSet)

func (*AliasCommand) Execute

func (cmd *AliasCommand) Execute(args []string) error

type Assert

type Assert interface {
	Success() bool
	Failed() bool
	Message() string
}

Assert -- Interface to an assertion result

func NewAssert

func NewAssert(err error, context string, message string, a ...interface{}) Assert

NewAssert -- builds a failed assert using non-nil error or success assert with message

func NewAssertError

func NewAssertError(err error, context string) Assert

NewAssertError -- builds a failed assert using the error

func NewAssertFailure

func NewAssertFailure(context string, message string, a ...interface{}) Assert

NewAssertFailure -- Build a failed assert

func NewAssertSuccess

func NewAssertSuccess(context string, message string, a ...interface{}) Assert

NewAssertSuccess -- Build a successful assert

type AssertCommand

type AssertCommand struct {
	// contains filtered or unexported fields
}

func NewAssertCommand

func NewAssertCommand() *AssertCommand

func (*AssertCommand) AddOptions

func (cmd *AssertCommand) AddOptions(set shell.CmdSet)

func (*AssertCommand) Execute

func (cmd *AssertCommand) Execute(args []string) error

func (*AssertCommand) ExtendedUsage

func (cmd *AssertCommand) ExtendedUsage(w io.Writer)

func (*AssertCommand) GetSubCommands

func (cmd *AssertCommand) GetSubCommands() []string

func (*AssertCommand) HeaderUsage

func (cmd *AssertCommand) HeaderUsage(w io.Writer)

type CdCommand

type CdCommand struct {
	// contains filtered or unexported fields
}

func NewCdCommand

func NewCdCommand() *CdCommand

func (*CdCommand) AddOptions

func (cmd *CdCommand) AddOptions(set shell.CmdSet)

func (*CdCommand) Execute

func (cmd *CdCommand) Execute(args []string) error

type DebugCommand

type DebugCommand struct {
}

func NewDebugCommand

func NewDebugCommand() *DebugCommand

func (*DebugCommand) AddOptions

func (cmd *DebugCommand) AddOptions(set shell.CmdSet)

func (*DebugCommand) Execute

func (cmd *DebugCommand) Execute(args []string) error

type DiffCommand

type DiffCommand struct {
}

func NewDiffCommand

func NewDiffCommand() *DiffCommand

func (*DiffCommand) AddOptions

func (cmd *DiffCommand) AddOptions(set shell.CmdSet)

func (*DiffCommand) Execute

func (cmd *DiffCommand) Execute(args []string) error

type DirCommand

type DirCommand struct {
	// contains filtered or unexported fields
}

func NewDirCommand

func NewDirCommand() *DirCommand

func (*DirCommand) AddOptions

func (cmd *DirCommand) AddOptions(set shell.CmdSet)

func (*DirCommand) Execute

func (cmd *DirCommand) Execute(args []string) error

func (*DirCommand) ExecuteLegacy added in v1.3.0

func (cmd *DirCommand) ExecuteLegacy(args []string) error

func (*DirCommand) GetResults added in v1.3.0

func (cmd *DirCommand) GetResults(args []string) []Result

func (*DirCommand) GetRootFolder added in v1.3.0

func (cmd *DirCommand) GetRootFolder(path string) string

type EnvCommand

type EnvCommand struct {
}

func NewEnvCommand

func NewEnvCommand() *EnvCommand

func (*EnvCommand) AddOptions

func (cmd *EnvCommand) AddOptions(set shell.CmdSet)

func (*EnvCommand) Execute

func (cmd *EnvCommand) Execute(args []string) error

type File added in v1.3.0

type File struct {
	Name      string
	Date      time.Time
	Size      int64
	Mode      string
	IsDir     bool
	FullPath  string
	Reference string
}

type LogCommand

type LogCommand struct {
	// contains filtered or unexported fields
}

func NewLogCommand

func NewLogCommand() *LogCommand

func (*LogCommand) AddOptions

func (cmd *LogCommand) AddOptions(set shell.CmdSet)

func (*LogCommand) Execute

func (cmd *LogCommand) Execute(args []string) error

type PauseCommand

type PauseCommand struct {
	// contains filtered or unexported fields
}

func NewPauseCommand

func NewPauseCommand() *PauseCommand

func (*PauseCommand) Abort

func (cmd *PauseCommand) Abort()

func (*PauseCommand) AddOptions

func (cmd *PauseCommand) AddOptions(set shell.CmdSet)

func (*PauseCommand) Execute

func (cmd *PauseCommand) Execute(args []string) error

type Result added in v1.3.0

type Result struct {
	Message string
	Folder  string
	Files   []File
}

type SetCommand

type SetCommand struct {
	// contains filtered or unexported fields
}

func NewSetCommand

func NewSetCommand() *SetCommand

func (*SetCommand) AddOptions

func (cmd *SetCommand) AddOptions(set shell.CmdSet)

func (*SetCommand) Execute

func (cmd *SetCommand) Execute(args []string) error

func (*SetCommand) ExtendedUsage

func (cmd *SetCommand) ExtendedUsage(w io.Writer)

type SilentCommand

type SilentCommand struct {
}

func NewSilentCommand

func NewSilentCommand() *SilentCommand

func (*SilentCommand) AddOptions

func (cmd *SilentCommand) AddOptions(set shell.CmdSet)

func (*SilentCommand) Execute

func (cmd *SilentCommand) Execute(args []string) error

type SleepCommand

type SleepCommand struct {
	// contains filtered or unexported fields
}

func NewSleepCommand

func NewSleepCommand() *SleepCommand

func (*SleepCommand) Abort

func (cmd *SleepCommand) Abort()

func (*SleepCommand) AddOptions

func (cmd *SleepCommand) AddOptions(set shell.CmdSet)

func (*SleepCommand) Execute

func (cmd *SleepCommand) Execute(args []string) error

type VerboseCommand

type VerboseCommand struct {
}

func NewVerboseCommand

func NewVerboseCommand() *VerboseCommand

func (*VerboseCommand) AddOptions

func (cmd *VerboseCommand) AddOptions(set shell.CmdSet)

func (*VerboseCommand) Execute

func (cmd *VerboseCommand) Execute(args []string) error

Jump to

Keyboard shortcuts

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