Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/844196/go-untilread
untilread provide read function of until separator
https://github.com/844196/go-untilread
Last synced: 27 days ago
JSON representation
untilread provide read function of until separator
- Host: GitHub
- URL: https://github.com/844196/go-untilread
- Owner: 844196
- License: mit
- Created: 2017-05-07T14:16:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T14:28:39.000Z (over 7 years ago)
- Last Synced: 2024-06-20T12:40:20.448Z (5 months ago)
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-untilread [![](https://circleci.com/gh/844196/go-untilread.svg?style=shield&circle-token=d04f9961cb32d3df4ee68c4ff404b2765d9a22ce)](https://circleci.com/gh/844196/go-untilread) [![](https://goreportcard.com/badge/github.com/844196/go-untilread)](https://goreportcard.com/report/github.com/844196/go-untilread) [![](https://godoc.org/github.com/844196/go-untilread?status.svg)](https://godoc.org/github.com/844196/go-untilread)
untilread provide read function of until separator
## Usage
```go
package mainimport (
"fmt"
"strings""github.com/844196/go-untilread"
)func main() {
src := "こんにちは、ジャパリパーク。さようなら、世界。"
sep := "。"
ir := strings.NewReader(src)untilread.Do(ir, sep, func(s string) error {
fmt.Println(s)
return nil
})
// Output:
// こんにちは、ジャパリパーク。
// さようなら、世界。
}
```## Installation
```console
$ go get github.com/844196/go-untilread
```