trim

package
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Leading

func Leading(data []byte) []byte

func Nop

func Nop(token []byte) []byte

func ToLength added in v0.87.0

func ToLength(splitFunc bufio.SplitFunc, maxLength int) bufio.SplitFunc

func Trailing

func Trailing(data []byte) []byte

func Whitespace

func Whitespace(data []byte) []byte

func WithFunc added in v0.86.0

func WithFunc(splitFunc bufio.SplitFunc, trimFunc Func) bufio.SplitFunc

Types

type Config

type Config struct {
	PreserveLeading  bool `mapstructure:"preserve_leading_whitespaces,omitempty"`
	PreserveTrailing bool `mapstructure:"preserve_trailing_whitespaces,omitempty"`
}

func (Config) Func

func (c Config) Func() Func

type Func

type Func func([]byte) []byte

Jump to

Keyboard shortcuts

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