scan

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffLines added in v0.9.0

func DiffLines() func(data []byte, atEOF bool) (advance int, token []byte, err error)

DiffLines is a split function for a bufio.Scanner that splits a git diff output into multiple blocks of text, each prefixed by the diff --git marker. Each block of text will be stripped of any leading and trailing whitespace. If the git diff marker isn't detected, the entire block of text is returned, with any leading and trailing whitespace stripped

func NullTerminatedLines added in v0.11.1

func NullTerminatedLines() func(data []byte, atEOF bool) (advance int, token []byte, err error)

NullTerminatedLines is a split function for a bufio.Scanner that returns each block of text, stripped of both the null byte marker and any leading and trailing whitespace. If the null byte marker is not found, the original text will be treated as a single block of text, with any leading and trailing whitespace stripped.

func PrefixedLines

func PrefixedLines(prefix byte) func(data []byte, atEOF bool) (advance int, token []byte, err error)

PrefixedLines is a split function for a bufio.Scanner that returns each block of text, stripped of both the prefix marker and any leading and trailing whitespace. If no prefix is detected, the original text will be treated as a single block of text, with any leading and trailing whitespace stripped

Types

This section is empty.

Jump to

Keyboard shortcuts

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