Built-In source code location

前端 未结 2 1489
太阳男子
太阳男子 2020-12-04 23:54

Where in Go\'s source code can I find their implementation of make.

Turns out the \"code search\" functionality is almost useless for such a central fea

2条回答
  •  感情败类
    2020-12-05 00:16

    As a matter of fact make is a combination of different functions, implemented in Go, in the runtime.

    • makeslice for e.g. make([]int, 10)

    • makemap for e.g. make(map[string]int)

    • makechan for e.g. make(chan int)

    The same applies for the other built-ins like append and copy.

提交回复
热议问题