内建函数

常用

copy

1// The copy built-in function copies elements from a source slice into a
2// destination slice. (As a special case, it also will copy bytes from a
3// string to a slice of bytes.) The source and destination may overlap. Copy
4// returns the number of elements copied, which will be the minimum of
5// len(src) and len(dst).
6func copy(dst, src []Type) int

delete

1// The delete built-in function deletes the element with the specified key
2// (m[key]) from the map. If m is nil or there is no such element, delete
3// is a no-op.
4func delete(m map[Type]Type1, key Type)