Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{ AppName: "app", Output: "./", Watch: WatchCfg{ FileExt: []string{".go"}, Paths: []string{}, Vendor: false, Exclude: []string{}, }, Build: BuildCfg{ Delay: 5000, Args: []string{}, }, Run: RunCfg{ AutoRun: true, Args: []string{}, Envs: []string{}, }, }
默认值
Functions ¶
func NewDebounced ¶
New returns a debounced function that takes another functions as its argument. This function will be called when the debounced function stops being called for the given duration. The debounced function can be invoked with different functions, if needed, the last one will win.
Types ¶
type Config ¶
type Config struct { // 执行的app名字,默认是'app.exe' AppName string `yaml:"app-name"` // 指定output执行的程序路径,默认是'./' Output string `yaml:"output"` // watch相关参数 Watch WatchCfg // build相关参数 Build BuildCfg // run相关参数 Run RunCfg }
func (*Config) UnmarshalYAML ¶
Yml解析默认值
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
gowatch 对象
func NewWatcher ¶
func (*Watcher) StartWatch ¶
func (th *Watcher) StartWatch()
Click to show internal directories.
Click to hide internal directories.