patch

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

type Meta struct {
	OldName          string
	NewName          string
	AddedLines       []string
	DeletedLines     []string
	AddedLineCount   int
	DeletedLineCount int
}

Meta summarizes the accepted patch for downstream heuristic checks.

func ParseAndApply

func ParseAndApply(base []byte, patchText string) ([]byte, Meta, error)

ParseAndApply parses a single-file unified diff and applies it strictly to base.

Jump to

Keyboard shortcuts

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