Error: a() (no value) used as value

what you told is right but if we could do that return a() it would like reduce the number of lines.

I am doing these a number of times in my code in my http handlers

(s.close() return no value)

err = json.Unmarshal(data, &pInfo)
if err != nil {
	s.close()
	return
}

instead I want to write

err = json.Unmarshal(data, &pInfo)
if err != nil {
	return s.close()
}

yeah it’s a bit of a stupid question but what is the value of no-value anyway. Why can’t I return no-value value as it won’t be used in further down the call stack?

And ya it is bit clear to use the first one, as it tells the return value of the function and I need not to do further digging to figure out the return value.