Version: v2.0.0+incompatible Latest Latest

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 20 Imported by: 2




This section is empty.


View Source
var ErrorLogPath = func() string {
	return path.Join(LogLocation(), ID()+".err")
View Source
var LogLocation = func() string {
	dir, _ := homedir.Dir()
	dir, _ = homedir.Expand(dir)
	dir = path.Join(dir, ".refresh")
	os.MkdirAll(dir, 0755)
	return dir


func ID

func ID() string

func String

func String(s1, s2 string) string


type Configuration

type Configuration struct {
	AppRoot            string        `yaml:"app_root"`
	IgnoredFolders     []string      `yaml:"ignored_folders"`
	IncludedExtensions []string      `yaml:"included_extensions"`
	BuildTargetPath    string        `yaml:"build_target_path"`
	BuildPath          string        `yaml:"build_path"`
	BuildDelay         time.Duration `yaml:"build_delay"`
	BinaryName         string        `yaml:"binary_name"`
	CommandFlags       []string      `yaml:"command_flags"`
	CommandEnv         []string      `yaml:"command_env"`
	EnableColors       bool          `yaml:"enable_colors"`
	LogName            string        `yaml:"log_name"`

func (*Configuration) Dump

func (c *Configuration) Dump(path string) error

func (*Configuration) FullBuildPath

func (c *Configuration) FullBuildPath() string

func (*Configuration) Load

func (c *Configuration) Load(path string) error

type Logger

type Logger struct {
	// contains filtered or unexported fields

func NewLogger

func NewLogger(c *Configuration) *Logger

func (*Logger) Error

func (l *Logger) Error(msg interface{}, args ...interface{})

func (*Logger) Print

func (l *Logger) Print(msg interface{}, args ...interface{})

func (*Logger) Success

func (l *Logger) Success(msg interface{}, args ...interface{})

type Manager

type Manager struct {
	Logger  *Logger
	Restart chan bool

	ID string
	// contains filtered or unexported fields

func New

func New(c *Configuration) *Manager

func NewWithContext

func NewWithContext(c *Configuration, ctx context.Context) *Manager

func (*Manager) Start

func (r *Manager) Start() error

type Watcher

type Watcher struct {
	// contains filtered or unexported fields

func NewWatcher

func NewWatcher(r *Manager) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()


Path Synopsis

Jump to

Keyboard shortcuts

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