cli

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROCESS     = "snow"
	VERSION     = "0.1.5"
	DESCRIPTION = "snow is a static site generator."
)

Variables

This section is empty.

Functions

func Execute

func Execute()

Types

type Prompt

type Prompt interface {
	Excute(*bufio.Reader) error
}

type PromptBool

type PromptBool struct {
	Name        string
	Usage       string
	Value       bool
	Destination *bool
}

func (*PromptBool) Excute

func (p *PromptBool) Excute(r *bufio.Reader) error

type PromptFilePath

type PromptFilePath struct {
	Usage       string
	Value       string
	Required    bool
	MustExist   bool // 是否要求路径必须存在
	IsDir       bool // 是否要求为目录(否则为文件)
	Destination *string
}

PromptFilePath 用于文件路径输入

func (*PromptFilePath) Excute

func (p *PromptFilePath) Excute(r *bufio.Reader) error

type PromptInt

type PromptInt struct {
	Usage       string
	Value       int64
	Required    bool
	Destination *int64
}

func (*PromptInt) Excute

func (p *PromptInt) Excute(r *bufio.Reader) error

type PromptString

type PromptString struct {
	Usage       string
	Value       string
	Required    bool
	FilePath    bool
	Destination *string
}

func (*PromptString) Excute

func (p *PromptString) Excute(r *bufio.Reader) error

type Prompts

type Prompts []Prompt

func (Prompts) Excute

func (ps Prompts) Excute(r *bufio.Reader) error

Jump to

Keyboard shortcuts

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