Skip to content
masterclass Buddy

Go · Function

copy

The append built-in adds elements to a slice and returns the updated slice. Assign the result because append can reuse existing storage or allocate a new backing array.

Last updated

Syntax

func append(slice []Type, elems ...Type) []Type

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • make
  • len

Source: builtin package - builtin - Go Packages. Checked 2026-11-03.