This commit is contained in:
2025-05-31 14:07:09 -04:00
parent 8c7e8ae1cb
commit 2a076f0013

View File

@@ -7,7 +7,6 @@ import (
"log" "log"
"os" "os"
"strconv" "strconv"
"strings"
"time" "time"
) )
@@ -20,7 +19,7 @@ func readCSV(filenName string) [][]string {
log.Println("Opening CSV file from filepath", filenName) log.Println("Opening CSV file from filepath", filenName)
f, err := os.Open(filenName) f, err := os.Open(filenName)
if err != nil { if err != nil {
log.Fatal("%+v", err) log.Fatal("An error occured", err)
} }
defer f.Close() defer f.Close()
@@ -29,7 +28,7 @@ func readCSV(filenName string) [][]string {
records, err := csvReader.ReadAll() records, err := csvReader.ReadAll()
if err != nil { if err != nil {
log.Fatal("%+v", err) log.Fatal("An error occured", err)
} }
return records return records
} }
@@ -52,10 +51,6 @@ func getQuestionsFromCSV(fileName string) []Question {
return questions return questions
} }
func strip(s string) string {
return strings.ReplaceAll(s, " ", "")
}
func askQuestion(question Question, c chan int) { func askQuestion(question Question, c chan int) {
var userAnswer int var userAnswer int