Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 303 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 303 Bytes

go-scanln

Continously fetches user input from the console via fmt.Scanln and provides it on a channel.

Example

import (
	"fmt"

	"github.com/franklange/go-scanln"
)

func main() {
	input := scanln.NewScanln()
	defer input.Stop()

	select {
	case s := <-input.C:
		fmt.Println(s)
	}
}