Skip to content

Go module that provides user input from the console on a channel.

License

Notifications You must be signed in to change notification settings

franklange/go-scanln

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
	}
}

About

Go module that provides user input from the console on a channel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages