line

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Merger

type Merger interface {
	Null() bool              // 执行结束后, 需要判断是否为空, 如果不为空, 就再调用 Line
	Line() []byte            // 获取 merge 成功 line, 注: 获取完后, 应该调用一次 Residue 获取剩余的内容
	Append(data []byte) bool // 追加行内容, 如果返回 true 表示满足 merge 成功, 应该调用 Line 获取行内容; 反之未完成
}

type Multi

type Multi struct {
	// contains filtered or unexported fields
}

Multi 多行处理

func NewMulti

func NewMulti() *Multi

func (*Multi) Append

func (m *Multi) Append(data []byte) bool

func (*Multi) Line

func (m *Multi) Line() []byte

func (*Multi) Null added in v1.0.13

func (m *Multi) Null() bool

func (*Multi) StartPattern

func (m *Multi) StartPattern(expr string) error

StartPattern 行开始的正则表达式

type Single

type Single struct {
	// contains filtered or unexported fields
}

Single 单行内容

func NewSing

func NewSing() *Single

func (*Single) Append

func (s *Single) Append(data []byte) bool

func (*Single) Line

func (s *Single) Line() []byte

func (*Single) Null added in v1.0.13

func (s *Single) Null() bool

Jump to

Keyboard shortcuts

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