line

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 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 {
	Line() []byte            // 获取 merge 成功 line, 注: 获取完后, 应该调用一次 Residue 获取剩余的内容
	Residue() []byte         // 剩余 line 内容
	Append(data []byte) bool // 追加行内容, 如果返回 true 表示满足 merge 成功, 应该调用 Get 获取行内容; 反之未完成
}

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

Line 获取行内容 注: 获取完后, 应该调用一次 Residue 获取剩余的内容

func (*Multi) Residue

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

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) Residue

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

Jump to

Keyboard shortcuts

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