added print lines to increase user friendliness
This commit is contained in:
parent
212ad739d2
commit
ab66c88ffb
6
main.go
6
main.go
@ -10,10 +10,12 @@ import (
|
||||
|
||||
func main() {
|
||||
|
||||
fmt.Println("Welcome to Checkdigit Calculator")
|
||||
|
||||
directory, err := os.Getwd()
|
||||
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)
|
||||
input, err := reader.ReadString('\n')
|
||||
Error(err)
|
||||
@ -115,4 +117,6 @@ func main() {
|
||||
_, err := answerFile.WriteString(gtin + "\n")
|
||||
Error(err)
|
||||
}
|
||||
|
||||
fmt.Println("The answer.txt file has been successfully generated with check digits.")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user