package main import ( "bufio" "fmt" "os" ) func main() { reader := bufio.NewReader(os.Stdin) fmt.Print("Enter your name: ") name, _ := reader.ReadString('\n') fmt.Print("Enter your age: ") age, _ := reader.ReadString('\n') // Discard any remaining input reader.Discard(reader.Buffered()) // Print out user info fmt.Printf("Your name is %s and you are %s years old.\n", name, age) }In this example, we create a `bufio.Reader` to read input from the user via `os.Stdin`. We prompt the user for their name and age, and then call `reader.Discard(reader.Buffered())` to discard any remaining input in the buffered stream. Finally, we print out the user's name and age. Overall, the `bufio.Reader.Discard` method is useful when you need to prevent unwanted data from being processed or remaining in the buffer.