compare

package
v0.0.0-...-e54b549 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Original string
	Compared string

	Limit      uint
	SampleSize uint
	Offset     offsetFunc
}

func ParseConfig

func ParseConfig() *Config

func ParseConfigArgs

func ParseConfigArgs(name string, args []string) *Config

type Entry

type Entry struct {
	Original fs.DirEntry
	Compared fs.DirEntry
	Path     string
}

func NewEntry

func NewEntry(orig, comp fs.DirEntry, path string) Entry

type Result

type Result struct {
	Output string
	Path   string
	Stat   StatType
	Error  error
}

func Empty

func Empty() Result

func Error

func Error(err error) Result

func Output

func Output(output, path string, stat StatType) Result

func Stat

func Stat(stat StatType) Result

func (Result) IsEmpty

func (r Result) IsEmpty() bool

func (Result) String

func (r Result) String() string

type StatType

type StatType int
const (
	StatNone StatType = iota
	StatSearchedFile
	StatDifferentFile
	StatDifferentDirectory
	StatError
)

func (StatType) String

func (s StatType) String() string

type Stats

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

func Compare

func Compare(config *Config) (*Stats, error)

func CompareSerial

func CompareSerial(config *Config) (*Stats, error)

func (*Stats) Add

func (s *Stats) Add(statType StatType)

func (*Stats) String

func (s *Stats) String() string

Jump to

Keyboard shortcuts

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