An open API service indexing awesome lists of open source software.

https://github.com/kteru/reversereader

Read in reverse order for Golang
https://github.com/kteru/reversereader

golang io

Last synced: 3 days ago
JSON representation

Read in reverse order for Golang

Awesome Lists containing this project

README

          

reversereader
=============

Package reversereader provides basic interfaces to read.
It traverse an io.Reader as a backward stream.

[![GoDoc](https://godoc.org/github.com/kteru/reversereader?status.svg)](https://godoc.org/github.com/kteru/reversereader)

Installation
------------

```
$ go get -u github.com/kteru/reversereader
```

Example
-------

```
package main

import (
"bytes"
"io"
"os"

"github.com/kteru/reversereader"
)

func main() {
readSeeker := bytes.NewReader([]byte("hello world"))

revrd := reversereader.NewReader(readSeeker)

io.Copy(os.Stdout, revrd)
// => "dlrow olleh"
}
```