merge

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package merge implements a line-level three-way text merge.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasConflictMarkers

func HasConflictMarkers(text string) bool

HasConflictMarkers reports whether text contains unresolved conflict markers.

Types

type Result

type Result struct {
	Text        string // merged content
	HasConflict bool   // true if any conflict markers were written
}

Result is returned by Merge3.

func Merge3

func Merge3(base, ours, theirs string) Result

Merge3 merges base, ours, and theirs line by line. Non-overlapping changes are applied automatically; overlapping changes produce git-style conflict markers.

Jump to

Keyboard shortcuts

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