diff

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(oldPath, patchPath, outPath string) error

Apply applies a patch to an old file, producing the new file

func ApplyBytes

func ApplyBytes(oldData, patchData []byte) ([]byte, error)

ApplyBytes applies a patch to old bytes, returning new bytes

func ApplyHDiff added in v0.3.0

func ApplyHDiff(oldPath, patchPath, newPath string) error

ApplyHDiff applies a patch using hpatchz to oldPath, writing the result to newPath. Shells out to the hpatchz binary.

func Generate

func Generate(oldPath, newPath string) ([]byte, error)

Generate creates a binary patch from old to new

func GenerateBytes

func GenerateBytes(oldData, newData []byte) ([]byte, error)

GenerateBytes creates a patch from byte slices directly

func GenerateHDiff added in v0.3.0

func GenerateHDiff(oldPath, newPath, patchPath string) error

GenerateHDiff creates a patch using hdiffz between oldPath and newPath, writing the patch to patchPath. Shells out to the hdiffz binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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