Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is append() implementation?

Tags:

go

built-in

I cannot find implementation code of append() or any other builtin functions anywhere? I tried finding the code through godoc and using jump-to-definition feature of IDE's. May be i am looking at wrong places. Could anyone show me the way to see actual implementation?

like image 338
Mayank Patel Avatar asked Aug 03 '15 14:08

Mayank Patel


1 Answers

You may be interested by :

  • the code generating bit append is in here https://github.com/golang/go/blob/go1.16.7/src/cmd/compile/internal/gc/ssa.go
  • and growslice, used by the former, and that lives in here : https://github.com/golang/go/blob/go1.16.7/src/runtime/slice.go
like image 79
Mathias Dolidon Avatar answered Nov 19 '22 01:11

Mathias Dolidon