cli

package
v0.2.50 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildVersionString

func BuildVersionString() string

func NewBuildCmd

func NewBuildCmd(parent *flag.FlagSet) (*buildCmd, error)

func NewCaddyCmd added in v0.2.3

func NewCaddyCmd(parent *flag.FlagSet) (*caddyCmd, error)

NewCaddyCmd 创建 Caddy 管理命令

func NewDemoCmd

func NewDemoCmd(parent *flag.FlagSet) (*demoCmd, error)

func NewLicenseCmd added in v0.2.3

func NewLicenseCmd(parent *flag.FlagSet) (*licenseCmd, error)

func NewLoadCmd

func NewLoadCmd(parent *flag.FlagSet) (*loadCmd, error)

func NewServeCmd

func NewServeCmd(parent *flag.FlagSet) (*serverCmd, error)

func NewStaticCmd

func NewStaticCmd(parent *flag.FlagSet) (*staticCmd, error)

func NewVersionCmd

func NewVersionCmd(parent *flag.FlagSet) (*versionCmd, error)

Types

type Command added in v0.1.24

type Command interface {
	// Name returns the name of the command
	Name() string
	// Description returns the description of the command
	Description() string
	// Run executes the command
	Run() error
}

Command represents a CLI command

func GetCommands added in v0.1.24

func GetCommands() []Command

GetCommands returns all available commands

type ServeCommand added in v0.2.47

type ServeCommand struct{}

ServeCommand is an adapter for the existing serverCmd to work with the new Command interface

func (*ServeCommand) Description added in v0.2.47

func (c *ServeCommand) Description() string

Description returns the description of the command

func (*ServeCommand) Name added in v0.2.47

func (c *ServeCommand) Name() string

Name returns the name of the command

func (*ServeCommand) Run added in v0.2.47

func (c *ServeCommand) Run() error

Run executes the command

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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