gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/append1.go (about) 1 package main 2 3 import ( 4 "bufio" 5 "bytes" 6 ) 7 8 func main() { 9 s := bufio.NewScanner(bytes.NewReader([]byte("Hello\nTest\nLine3"))) 10 s.Scan() 11 println(string(append(s.Bytes(), []byte(" World")...))) 12 } 13 14 // Output: 15 // Hello World