I am new to Golang. I am confused why I got the error that partial
is not used in the code below?
// Using var keyword
var partial string
for i, request := range requestVec {
if i == (len(requestVec)-1) && !strings.Contains(request, "\r\n\r\n") {
partial = request
break
}
}
I assign request
to partial
in the if
statement.