week1

package
v0.0.0-...-c234f5e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIndexOutOfRange = errors.New("index out of range")

Functions

func DeleteAt

func DeleteAt[T any](src []T, index int) ([]T, error)

DeleteAt deletes the element at index. If the index is out of range, it returns ErrIndexOutOfRange.

func Shrink

func Shrink[T any](src []T) []T

Shrink shrinks the capacity of a slice by calCapacity.

Types

This section is empty.

Jump to

Keyboard shortcuts

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