ios

package
v0.5.40 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 8 Imported by: 3

Documentation

Overview

Package ios 输入输出相关.

包括 ReadLine, ContainsReader, WalkDir.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter added in v0.2.19

func NewWriter(file string) (io.WriteCloser, error)

NewWriter 新建Writer,file存在Seek末尾,不存在创建.

func ReadLine

func ReadLine(file string, call func(line string) error) error

func ReaderLine

func ReaderLine(reader io.Reader, call func(line string) error) error

func WalkDir

func WalkDir(root string, walkDirFunc fs.WalkDirFunc, level int) error

Types

type ContainsReader

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

func NewContainsReader

func NewContainsReader(reader io.Reader, subslice []byte) *ContainsReader

func (*ContainsReader) Contains

func (p *ContainsReader) Contains() bool

func (*ContainsReader) Read

func (p *ContainsReader) Read(data []byte) (int, error)

Jump to

Keyboard shortcuts

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