Documentation
¶
Index ¶
- func BuildVersionString() string
- func NewBuildCmd(parent *flag.FlagSet) (*buildCmd, error)
- func NewCaddyCmd(parent *flag.FlagSet) (*caddyCmd, error)
- func NewDemoCmd(parent *flag.FlagSet) (*demoCmd, error)
- func NewLicenseCmd(parent *flag.FlagSet) (*licenseCmd, error)
- func NewLoadCmd(parent *flag.FlagSet) (*loadCmd, error)
- func NewServeCmd(parent *flag.FlagSet) (*serverCmd, error)
- func NewStaticCmd(parent *flag.FlagSet) (*staticCmd, error)
- func NewVersionCmd(parent *flag.FlagSet) (*versionCmd, error)
- type Command
- type ServeCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildVersionString ¶
func BuildVersionString() string
func NewBuildCmd ¶
func NewCaddyCmd ¶ added in v0.2.3
NewCaddyCmd 创建 Caddy 管理命令
func NewDemoCmd ¶
func NewLicenseCmd ¶ added in v0.2.3
func NewLoadCmd ¶
func NewServeCmd ¶
func NewStaticCmd ¶
func NewVersionCmd ¶
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.