package
0.0.0-20170224015737-e8ebaed0777a
Repository: https://github.com/odeke-em/go-utils.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

fread

Package to read from an io.Reader similar to C's fread(*FILE,...)

and it returns a channel of strings chan string

Usage in programs

import "github.com/odeke-em/go-utils/fread"

...

f := os.Stdin  // Could be something else
linesChan := fread.Fread(f)
linesChanWithIgnorer := fread.Fread(f, func(s string) bool { return len(s) >= 1 && s[0] == "#"} )

Sample program

$ go get github.com/odeke-em/go-utils/cmd/stdin-io

That will just read content from stdin and dump it to stdout.