I'm new in go language. I'm trying to understand what's happening inside ioutil.ReadAll(r Reader, capacity int64) method. Inside this method there is a line like:
buf := bytes.NewBuffer(make([]byte, 0, capacity))
But the problem is inside bytes package there is a NewBuffer method with only parameter like:
func NewBuffer(buf []byte) *Buffer
I searched bytes package documentation again and again but can't find NewBuffer method with 3 parameter.
So actually from where NewBuffer(make([]byte, int, int64)) method calling?