go-linereader

Golang package that reads lines from an io.Reader and puts them onto a channel.

  • Owner: mitchellh/go-linereader
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

go-linereader

go-linereader (Golang package: linereader) is a package for Go that
breaks up the input from an io.Reader into multiple lines. It is
a lot like bufio.Scanner, except you can specify timeouts that will push
"lines" through after a certain amount of time. This lets you read lines,
but return any data if a line isn't updated for some time.

Installation and Usage

Install using go get github.com/mitchellh/go-linereader.

Full documentation is available at
http://godoc.org/github.com/mitchellh/go-linereader

Below is an example of its usage ignoring errors:

// Assume r is some set io.Reader. Perhaps a file, network, anything.
var r io.Reader

// Initialize the line reader
lr := linereader.New(r)

// Get all the lines
for line := <-lr.Ch {
	// Do something with the line. This line will have the line separator
	// removed.
}

Main metrics

Overview
Name With Ownermitchellh/go-linereader
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-10-05 17:11:03
Pushed At2019-02-13 21:33:13
Last Commit At2019-02-13 13:33:12
Release Count0
用户参与
Stargazers Count67
Watchers Count3
Fork Count5
Commits Count5
Has Issues Enabled
Issues Count2
Issue Open Count0
Pull Requests Count1
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private