diff

package
v0.0.0-...-34a2e9f Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDiffSizeCopied the input and output copy size doesnt match
	ErrDiffSizeCopied = errors.New("the input and output copy size doesnt match")

	// ErrUnknownDirection unknown direction to copy file (src -> dst OR dst -> src)
	ErrUnknownDirection = errors.New("unknown direction to copy file (src -> dst OR dst -> src)")
)

Functions

This section is empty.

Types

type DIRECTION

type DIRECTION int
const (
	UNKNOWN_DIRECTION DIRECTION = iota
	DIRECTION_SRC_TO_DST
	DIRECTION_DST_TO_SRC
)

type Diff

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

func New

func New(opts DiffOpts) *Diff

func (*Diff) Process

func (d *Diff) Process() error

type DiffCompare

type DiffCompare struct {
	SrcFile   *DiffFile
	DstFile   *DiffFile
	Direction DIRECTION
}

type DiffFile

type DiffFile struct {
	Path    string
	RelPath string
	Attr    *fs.FileInfo
	Hash    string // crypto/sha256 calculated only if attr mod is different
}

type DiffOpts

type DiffOpts struct {
	RootSrcPath   string
	RootDstPath   string
	SkipSrcUpdate bool
	DryRun        bool
}

Jump to

Keyboard shortcuts

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