Go’s escape analysis and why my function return worked