patchfile

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package patchfile provides a standard interface to read patchsets from files.

Index

Constants

This section is empty.

Variables

View Source
var Log = func(format string, a ...interface{}) {}

Log is used to log debugging messages.

Functions

func GetFormat

func GetFormat(name string) (func([]byte) (PatchSet, error), bool)

GetFormat gets a format.

func GetFormats added in v0.9.2

func GetFormats() []string

GetFormats gets all registered formats.

func RegisterFormat

func RegisterFormat(name string, f func([]byte) (PatchSet, error))

RegisterFormat registers a format.

Types

type PatchSet

type PatchSet interface {
	// Validate validates the PatchSet.
	Validate() error
	// ApplyTo applies a PatchSet to a Patcher.
	ApplyTo(*patchlib.Patcher) error
	// SetEnabled sets the Enabled state of a Patch in a PatchSet.
	SetEnabled(string, bool) error
}

PatchSet represents a set of patches which can be applied to a Patcher.

func ReadFromFile

func ReadFromFile(format, filename string) (PatchSet, error)

ReadFromFile reads a patchset from a file (but does not validate it).

Directories

Path Synopsis
Package patch32lsb reads patch32lsb style patches.
Package patch32lsb reads patch32lsb style patches.

Jump to

Keyboard shortcuts

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