Examples using... "bufio"
Recent
Writer implements buffering for an io.Writer object.
If an error occurs writing to a Writer, no more data will be
accepted and all subsequent writes, and Flush, will return the error.
After all data has been written, the client should call the
Flush method to guarantee all data has been forwarded to...
Return the most recent call to Scan as a []byte.
Use a Scanner to implement a simple word-count utility by scanning the
input as a sequence of space-delimited tokens.
The simplest use of a Scanner, to read standard input as a set of lines.
Use a Scanner with a custom split function to parse a comma-separated
list with an empty final value.
Use a Scanner with a custom split function (built by wrapping ScanWords) to validate
32-bit decimal input.
The Go standard library comes with excellent support for HTTP clients and servers in the net/http package. In this example we’ll use it to issue simple HTTP requests.
Here’s an example line filter in Go that writes a capitalized version of all input text. You can use this pattern to write your own Go line filters.