index

package
v0.0.0-...-76b8f56 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Status         string   `toml:"status"`
	StatusOriginal string   `toml:"status-original,omitempty"`
	BadCount       int      `toml:"bad-count,omitzero"`
	Dependencies   []string `toml:"dependencies"`
	// contains filtered or unexported fields
}

File is a file that has been indexed

func (*File) Check

func (file *File) Check(tempDir string) bool

Check checks that the file exists and is valid

func (*File) Init

func (file *File) Init(fileName string) error

Init checks that the file is correct, and stores the file name

func (*File) MoveToTemp

func (file *File) MoveToTemp(tempDir string) error

MoveToTemp moves the file to the temporary directory

func (*File) MoveToTest

func (file *File) MoveToTest() error

MoveToTest moves the file to the testing directory

type Index

type Index struct {
	TempDirectory string `toml:"temp-directory"`

	Files map[string]File
}

Index is the index of all files to bisect

func LoadIndex

func LoadIndex() (Index, error)

LoadIndex loads the index file

func LoadOrCreateIndex

func LoadOrCreateIndex() (Index, error)

LoadOrCreateIndex attempts to load the index file, and returns an empty index if it does not exist

func (*Index) Bad

func (idx *Index) Bad()

Bad states that the files in the main directory are bad, one of them is very bad

func (*Index) Good

func (idx *Index) Good()

Good states that the files in the main directory are good

func (*Index) Ignore

func (idx *Index) Ignore(file string)

Ignore ignores a file, it's that simple!

func (*Index) Init

func (idx *Index) Init()

Init checks all the current files, to see if they are valid

func (*Index) Refresh

func (idx *Index) Refresh()

Refresh reads the current folder and updates all the files/folders in it

func (*Index) Reset

func (idx *Index) Reset()

Reset changes all good/bad files to unknown

func (Index) Save

func (idx Index) Save() error

Save saves the index file

Jump to

Keyboard shortcuts

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