status

package
v3.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Glob

func Glob(dir string, g string) ([]string, error)

Types

type Checker

type Checker interface {
	IsUpToDate() (bool, error)
	Value() (interface{}, error)
	OnError() error
	Kind() string
}

Checker is an interface that checks if the status is up-to-date

type Checksum

type Checksum struct {
	BaseDir   string
	TaskDir   string
	Task      string
	Sources   []string
	Generates []string
	Dry       bool
}

Checksum validades if a task is up to date by calculating its source files checksum

func (*Checksum) IsUpToDate

func (c *Checksum) IsUpToDate() (bool, error)

IsUpToDate implements the Checker interface

func (*Checksum) Kind

func (*Checksum) Kind() string

Kind implements the Checker Interface

func (*Checksum) OnError

func (c *Checksum) OnError() error

OnError implements the Checker interface

func (*Checksum) Value

func (c *Checksum) Value() (interface{}, error)

Value implements the Checker Interface

type None

type None struct{}

None is a no-op Checker

func (None) IsUpToDate

func (None) IsUpToDate() (bool, error)

IsUpToDate implements the Checker interface

func (None) Kind

func (None) Kind() string

func (None) OnError

func (None) OnError() error

OnError implements the Checker interface

func (None) Value

func (None) Value() (interface{}, error)

Value implements the Checker interface

type Timestamp

type Timestamp struct {
	Dir       string
	Sources   []string
	Generates []string
}

Timestamp checks if any source change compared with the generated files, using file modifications timestamps.

func (*Timestamp) IsUpToDate

func (t *Timestamp) IsUpToDate() (bool, error)

IsUpToDate implements the Checker interface

func (*Timestamp) Kind

func (t *Timestamp) Kind() string

func (*Timestamp) OnError

func (*Timestamp) OnError() error

OnError implements the Checker interface

func (*Timestamp) Value

func (t *Timestamp) Value() (interface{}, error)

Value implements the Checker Interface

Jump to

Keyboard shortcuts

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