When the appendslice, the slice can be increased, if necessary. Since spec does not specify an algorithm, this is interesting to me.
I am trying to find an implementation appendin the Go source code but cannot find it.
Can someone explain the indicated algorithm to enlarge the fragment? Is the capacity always doubled? or can anyone indicate the location of the source code append? I can check it out myself.
source
share