runner

package
v1.40.5 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPollingInterval = 3 * time.Second

DefaultPollingInterval is 3 seconds for file changes.

View Source
const (
	// PlatformWindows const for windows
	PlatformWindows = "windows"
)

Variables

This section is empty.

Functions

func ParseConfigFlag added in v1.40.4

func ParseConfigFlag(f *flag.FlagSet) map[string]TomlInfo

ParseConfigFlag parse toml information for flag

Types

type Config added in v1.40.4

type Config struct {
	Root        string     `toml:"root"`
	TmpDir      string     `toml:"tmp_dir"`
	TestDataDir string     `toml:"testdata_dir"`
	Polling     cfgPolling `toml:"polling"`
	Build       cfgBuild   `toml:"build"`
	Color       cfgColor   `toml:"color"`
	Log         cfgLog     `toml:"log"`
	Misc        cfgMisc    `toml:"misc"`
	Screen      cfgScreen  `toml:"screen"`
}

Config is the main configuration structure for Air.

func InitConfig added in v1.40.4

func InitConfig(path string) (cfg *Config, err error)

InitConfig initializes the configuration.

func (*Config) GetPollingInterval added in v1.40.5

func (c *Config) GetPollingInterval() time.Duration

GetPollingInterval returns the polling interval.

func (*Config) WithArgs added in v1.40.4

func (c *Config) WithArgs(args map[string]TomlInfo)

WithArgs returns a new config with the given arguments added to the configuration.

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine ...

func NewEngine

func NewEngine(cfgPath string, debugMode bool) (*Engine, error)

NewEngine ...

func NewEngineWithConfig added in v1.40.4

func NewEngineWithConfig(cfg *Config, debugMode bool) (*Engine, error)

NewEngineWithConfig ...

func (*Engine) Run

func (e *Engine) Run()

Run run run

func (*Engine) Stop

func (e *Engine) Stop()

Stop the air

type TomlInfo added in v1.40.4

type TomlInfo struct {
	Value *string
	// contains filtered or unexported fields
}

TomlInfo is a struct for toml config file

Jump to

Keyboard shortcuts

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