diff

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package diff computes the efficient set of changes (insert/delete) between two arrays of strings

Index

Constants

View Source
const (
	// OpDelete is the operation kind for a line that is present in the input
	// but not in the output.
	OpDelete opKind = iota
	// OpInsert is the operation kind for a line that is new in the output.
	OpInsert
)

Variables

This section is empty.

Functions

func Diff

func Diff(a, b []string, opts ...Opt) []string

Diff returns the difference between two strings

func WithContext

func WithContext(a, b int) func(*conf)

func WithFullContext

func WithFullContext() func(*conf)

Types

type Opt

type Opt func(*conf)

Jump to

Keyboard shortcuts

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