patchformat

package
v0.1.0-p8a.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package patchformat parses and prepares the bounded Codex patch format used by local and companion workspace tools. It performs no filesystem I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kind

type Kind string
const (
	Add    Kind = "add"
	Update Kind = "update"
	Delete Kind = "delete"
)

type Mutation

type Mutation struct {
	Path   string
	Action string
	Before []byte
	After  []byte
}

func Prepare

func Prepare(operation Operation, before []byte, exists bool) (Mutation, error)

type Operation

type Operation struct {
	Kind  Kind
	Path  string
	Lines []string
}

func Parse

func Parse(input string, maxOperations int) ([]Operation, error)

Jump to

Keyboard shortcuts

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