Improving my solution to the Quiz project from Gophercises in Golang
from what I saw there are a few changes that could be done to the program

while parsing command-line arguments I think it's better to put them inside a function cause it makes the code look clean and simple and as it is returned as a pointer you would have to keep getting the value as * but you could return it as the specific type and have a simpler handling
 csvFile, timeLimit, isShuffle := parseCMD() 

 func parseCMD() (string, int, bool) {
 csvFile := flag.String(&quot;csv&quot;, &quot;problems.csv&quot;, &quot;a csv file in the format of 'question,answer'&quot;)
 timeLimit := flag.Int(&quot;limit&quot;, 3, &quot;the time limit for the quiz in seconds&quot;)
 isShuffle := flag.Bool(&quot;shuffle&quot;, false, &quot;shuffle the quiz order each time it is run&quot;)
 flag.Parse()
 return *csvFile, *timeLimit, *isShuffle

}

var (
csvFile = flag.String(&quot;csv&quot;, &quot;problems.csv&quot;, &quot;a csv file in the format of 'question,answer'&quot;)
timeLimit = flag.Int(&quot;limit&quot;, 3, &quot;the time limit for the quiz in seconds&quot;)
isShuffle = flag.Bool(&quot;shuffle&quot;, false, &quot;shuffle the quiz order each time it is run&quot;)
)
var can be used on a variable that doesn't have any initialization or if it's gonna be a global score or... if in a case outside an if statement or a for loop (a situation where:= won't work)..  as these are being declared inside a function and have a default value a short variable declaration would be a more golang kinda way. (there is not a lot of difference between using var and:= in your code but in a situation like this:= would be more golang-ish)
https://stackoverflow.com/questions/53404305/when-to-use-var-or-in-go/53404332
https://stackoverflow.com/questions/21657446/var-vs-in-go




 timer := time.NewTimer(time.Duration(*timeLimit) * time.Second)

while defining a ticker add a &quot;defer ticker.stop()&quot; to release any resource related to as it wont be garbage collected (https://golang.org/src/time/tick.go)

if isTimerDone {
select {
case &lt;-ch:
if recipientAnswer == quiz.answer {
score += 1
}
case &lt;-timer.C:
isTimerDone = false
fmt.Println()
return
}
} else {
break
}


In the above case the if check (isTimerDone) won't actually hit as by flow you always go into the select case and if you get an answer you continue the loop and if the timer hits you return.. so a better way to write it would be to remove the IF-ELSE check..
from what I understand yours is a score counting program so assuming you don't answer and the timer hit.. you could continue the loop and score based on the total answer or break the loop if he doesn't answer (this is just a suggestion :) )