Help us shape the future of Go! Take the 2026 Go Developer Survey

slicegrow

package
v3.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy[Slice ~[]E, E any](dst Slice, src Slice) Slice

func CopyString

func CopyString[Slice ~[]byte](dst Slice, src string) Slice

func GrowToCap

func GrowToCap[Slice ~[]E, E any](s Slice, n int) Slice

GrowToCap grows the slice to at least n elements total capacity. It is an alternative to slices.Grow that increases the capacity of the slice instead of allowing n new appends. This is useful when the slice is expected to have nil values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL