The Difference Between new and make

In Go we often have to allocate memory for variables, and there are two ways to allocate memory: new and make. I looked up some material, and took the chance to review the places where I use them in my own development. Actually, it’s quite easy to understand.

new allocates memory but does not initialize it, which means you cannot assign to it directly — you must initialize it before you can assign.

make allocates the memory and has already