reader

package
Version: v0.0.0-...-6c58b8e Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentPath

func GetCurrentPath(path string) string

GetCurrentPath to get current path

func GetNowPath

func GetNowPath(path string) string

GetNowPath to get now path

Types

type Reader

type Reader struct {
	FilePath string //配置的路径 正则路径

	Stream      chan string
	CurrentPath string //当前的路径
	Close       chan struct{}
	// contains filtered or unexported fields
}

Reader to read file

func NewReader

func NewReader(filepath string, stream chan string) (*Reader, error)

NewReader to create a reader

func (*Reader) Start

func (r *Reader) Start()

Start a reader

func (*Reader) StartRead

func (r *Reader) StartRead()

StartRead to start to read

func (*Reader) Stop

func (r *Reader) Stop()

Stop to stop a reader

func (*Reader) StopRead

func (r *Reader) StopRead() error

StopRead to stop a read instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL