loop io.Reader for golang
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
sound
spinner
.gitignore
.travis.yml
LICENSE
README.md
dep-rev.json
gdf.json
loop.go
loop_test.go

README.md

loop

loop io.Reader for golang

Build Status

Usage

package main

import (
    "fmt"
    "gopkg.in/metakeule/loop.v4"
)

func main() {
    l := loop.New([]byte("abc..."))

    // ad infinitum abc...abc...abc...
    for {
        b := make([]byte, 2)
        l.Read(b)
        fmt.Print(string(b))
    }
}

Spinner subpackage

package main

import (
    "gopkg.in/metakeule/loop.v4/spinner"
    "time"
)

func main() {
    sp := spinner.New()
    for {
        sp.Spin()
        time.Sleep(120 * time.Millisecond)
    }
}