Explain the use of Go's close function for closing channels?