fmtdiff

package
v0.240828.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: 0BSD Imports: 9 Imported by: 0

Documentation

Overview

Package fmtdiff formats diffs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTMLBuckets

func HTMLBuckets(buckets []Bucket, unchanged []string, contextLines int) string

HTMLBuckets formats a list of diff buckets into a HTML document.

func Unified

func Unified(d andiff.Diff, contextLines int, colorize bool) string

Unified returns unified diff, suitable for terminal output.

func UnifiedBuckets

func UnifiedBuckets(buckets []Bucket, unchanged []string, sepch byte, contextLines int, colorize bool) string

UnifiedBuckets formats a list of diff buckets into a edtextar.

Types

type Bucket

type Bucket struct {
	Hash    uint64
	Entries []Entry
}

Bucket contains Diffs that hash to the same value.

type Entry

type Entry struct {
	Name    string
	Comment string
	Diff    andiff.Diff
}

Entry is a andiff.Diff with a name associated.

Jump to

Keyboard shortcuts

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