internal

package
v0.0.0-...-ac98775 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectNewline

func DetectNewline(input []byte) string

func EnsureFile

func EnsureFile(path string) error

func GetMatches

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

func LineNumber

func LineNumber(source string, pos int) int

func LineNumber(source string, pos int, newline string) int {

func Lines

func Lines(source string) []string

func Lines(source string, newline string) []string {

func Max

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

func Min

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

func MinIndent

func MinIndent(lines []string) int

func PreviewLines

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

Types

type Match

type Match struct {
	Text  string
	Start int
	End   int
}

Jump to

Keyboard shortcuts

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