wa-lang.org/wazero@v1.0.2/internal/gojs/testdata/stdio/main.go (about)

     1  package stdio
     2  
     3  import (
     4  	"bufio"
     5  	"os"
     6  )
     7  
     8  func Main() {
     9  	reader := bufio.NewReader(os.Stdin)
    10  	input, _, err := reader.ReadLine()
    11  	if err != nil {
    12  		panic(err)
    13  	}
    14  	println("println", string(input))
    15  	os.Stdout.Write([]byte("Stdout.Write"))
    16  	os.Stderr.Write([]byte("Stderr.Write"))
    17  }