slicesutil

package
v0.38.0-victorialogs Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendCapacity

func ExtendCapacity[T any](a []T, itemsToAdd int) []T

ExtendCapacity returns a with the capacity extended to len(a)+itemsToAdd.

It may allocate new slice if cap(a) is smaller than len(a)+itemsToAdd.

func SetLength

func SetLength[T any](a []T, newLen int) []T

SetLength sets len(a) to newLen and returns the result.

It may allocate new slice if cap(a) is smaller than newLen.

Types

This section is empty.

Jump to

Keyboard shortcuts

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