go-internal: github.com/rogpeppe/go-internal/internal/textutil Index | Files

package textutil

import "github.com/rogpeppe/go-internal/internal/textutil"

package textutil contains text processing utilities.

This package came to life as a result of refactoring code common to internal packages we have factored out of the Go repo.

Index

Package Files

diff.go doc.go

func Diff Uses

func Diff(text1, text2 string) string

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

Package textutil imports 2 packages (graph) and is imported by 2 packages. Updated 2019-02-03. Refresh now. Tools for package owners.