added print lines to increase user friendliness

This commit is contained in:
John O'Keefe 2023-12-08 13:07:47 -05:00
parent 212ad739d2
commit ab66c88ffb

View File

@ -10,10 +10,12 @@ import (
func main() { func main() {
fmt.Println("Welcome to Checkdigit Calculator")
directory, err := os.Getwd() directory, err := os.Getwd()
Error(err) Error(err)
fmt.Printf("What is the name of the file: ") fmt.Printf("What is the name of the file in this directory?: ")
reader := bufio.NewReader(os.Stdin) reader := bufio.NewReader(os.Stdin)
input, err := reader.ReadString('\n') input, err := reader.ReadString('\n')
Error(err) Error(err)
@ -115,4 +117,6 @@ func main() {
_, err := answerFile.WriteString(gtin + "\n") _, err := answerFile.WriteString(gtin + "\n")
Error(err) Error(err)
} }
fmt.Println("The answer.txt file has been successfully generated with check digits.")
} }