runner

package
v0.0.0-...-dbeb2f5 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package runner …

Index

Constants

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

Variables

This section is empty.

Functions

func ParseConfigFlag

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

ParseConfigFlag parse toml information for flag

Types

type CfgBuild

type CfgBuild struct {
	Cmd              string        `toml:"cmd"`
	Bin              string        `toml:"bin"`
	FullBin          string        `toml:"full_bin"`
	ArgsBin          []string      `toml:"args_bin"`
	Log              string        `toml:"log"`
	IncludeExt       []string      `toml:"include_ext"`
	ExcludeDir       []string      `toml:"exclude_dir"`
	IncludeDir       []string      `toml:"include_dir"`
	ExcludeFile      []string      `toml:"exclude_file"`
	IncludeFile      []string      `toml:"include_file"`
	ExcludeRegex     []string      `toml:"exclude_regex"`
	ExcludeUnchanged bool          `toml:"exclude_unchanged"`
	FollowSymlink    bool          `toml:"follow_symlink"`
	Poll             bool          `toml:"poll"`
	PollInterval     int           `toml:"poll_interval"`
	Delay            int           `toml:"delay"`
	StopOnError      bool          `toml:"stop_on_error"`
	SendInterrupt    bool          `toml:"send_interrupt"`
	KillDelay        time.Duration `toml:"kill_delay"`
	Rerun            bool          `toml:"rerun"`
	RerunDelay       int           `toml:"rerun_delay"`
	// contains filtered or unexported fields
}

func (*CfgBuild) RegexCompiled

func (c *CfgBuild) RegexCompiled() ([]*regexp.Regexp, error)

type CfgColor

type CfgColor struct {
	Main    string `toml:"main"`
	Watcher string `toml:"watcher"`
	Build   string `toml:"build"`
	Runner  string `toml:"runner"`
	App     string `toml:"app"`
}

type CfgLog

type CfgLog struct {
	AddTime  bool `toml:"time"`
	MainOnly bool `toml:"main_only"`
}

type CfgMisc

type CfgMisc struct {
	CleanOnExit bool `toml:"clean_on_exit"`
}

type CfgScreen

type CfgScreen struct {
	ClearOnRebuild bool `toml:"clear_on_rebuild"`
	KeepScroll     bool `toml:"keep_scroll"`
}

type Config

type Config struct {
	Root        string    `toml:"root"`
	TmpDir      string    `toml:"tmp_dir"`
	TestDataDir string    `toml:"testdata_dir"`
	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 DefaultConfig

func DefaultConfig() Config

func InitConfig

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

InitConfig initializes the configuration.

func (*Config) WithArgs

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

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

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