sample

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sample provides sample commands that demonstrate the command package.

Boiler plate flag-based command for convenience:

type SampleCommand struct {
	command.FlagCommandBase
}

func NewSampleCommand() *SampleCommand {
	return &SampleCommand{
		FlagCommandBase: command.NewFlagCommandBase("name", "description"),
	}
}

func (cmd SampleCommand) Run(args []string) error {
	return nil
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloCommand

type HelloCommand struct {
	command.FlagCommandBase
}

Sample hello command for printing "Hello" to the console.

func NewHelloCommand

func NewHelloCommand() *HelloCommand

Create a new HelloCommand.

func (HelloCommand) Run

func (cmd HelloCommand) Run(args []string) error

Run the command. See usage string for details.

Jump to

Keyboard shortcuts

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