internal

package
v0.0.0-...-01a91d6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectNewline

func DetectNewline(input []byte) string

DetectNewline ...

func GetMatches

func GetMatches(exp *regexp.Regexp, text string) []map[string]Match

GetMatches ...

func LineNumber

func LineNumber(source string, pos int) int

LineNumber ...

func Lines

func Lines(source string) []string

Lines ...

func Max

func Max[T constraints.Ordered](a T, b T) T

Max returns the maximum of two values

func Min

func Min[T constraints.Ordered](a T, b T) T

Min returns the minimum of two values

func MinIndent

func MinIndent(lines []string) int

MinIndent ...

func PreviewLines

func PreviewLines(lines []string, length int) []string

PreviewLines ...

Types

type Match

type Match struct {
	Text  string
	Start int
	End   int
}

Match ...

Jump to

Keyboard shortcuts

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