diff

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package diff provides basic text comparison (like Unix's diff(1)).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Files

func Files(got, want string) error

Files returns a formatted diff of the two texts from the provided two file names. Files returns nil if they compare equal.

func Format

func Format(got, want string) string

Format returns a formatted diff of the two texts, showing the entire text and the minimum line-level additions and removals to turn got into want. (That is, lines only in got appear with a leading -, and lines only in want appear with a leading +.)

Types

This section is empty.

Jump to

Keyboard shortcuts

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