Skip to content

Instantly share code, notes, and snippets.

@adeleke5140
Last active May 8, 2022 11:56
Show Gist options
  • Save adeleke5140/fcd57f97ba12199aee18d5753621041c to your computer and use it in GitHub Desktop.
Save adeleke5140/fcd57f97ba12199aee18d5753621041c to your computer and use it in GitHub Desktop.
Read input from STDIN and print Output to STDOUT
package main
// import the required packages
import (
"fmt"
"bufio"
"os"
)
func main {
//read the input ans save to a reader variable
reader := bufio.NewReader(os.Stdin);
//get the message and skip the error
message, _ := reader.ReadString('\n);
fmt.Println("Hello, World.")
fmt.Println(message)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment