package main import ( "bufio" "fmt" "strings" ) func main() { input := strings.NewReader("Hello, world!") reader := bufio.NewReader(input) for { b, err := reader.ReadByte() if err != nil { fmt.Println("Error:", err) break } fmt.Printf("%c\n", b) } }In this example, we create a new string reader with the text "Hello, world!" and pass it to a bufio.Reader. We then loop over the input stream using ReadByte to read and print each byte until we reach the end of the input stream. This code example demonstrates the use of the bufio package in Go.