Go - Standard Stream (stdin, stdout, stderr)

Card Puncher Data Processing

About

IO - Standard streams (stdin, stdout, stderr) in Go

List

stdin

  • Equivalent to cat. Take the standard input and print it to standard output
// Scanner reads input and breaks it into lines or words;
// The split function defaults to ScanLines.
input := bufio.NewScanner(os.Stdin)
for input.Scan() {
	fmt.Println(input.Text())
}

'

stdout

stdout is a file that is printed immediately to the screen by the console.

// See all fmt.print function
fmt.Println("Bouh")





Discover More
Card Puncher Data Processing
Go - IO

ioutil.Discard to discard IO (doing nothing with) io.Writer (implementation output stream)



Share this page:
Follow us:
Task Runner