sliceutil

package
v2.0.29 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValue

func GetValue[T any](vs []T, idx int, def ...T) (v T, exists bool)

Types

type SyncSlice added in v2.0.10

type SyncSlice[V any] struct {
	// contains filtered or unexported fields
}

func (*SyncSlice[V]) Append added in v2.0.10

func (s *SyncSlice[V]) Append(v ...V)

func (*SyncSlice[V]) Data added in v2.0.10

func (s *SyncSlice[V]) Data() []V

func (*SyncSlice[V]) Delete added in v2.0.10

func (s *SyncSlice[V]) Delete(i int)

func (*SyncSlice[V]) Index added in v2.0.10

func (s *SyncSlice[V]) Index(i int) V

func (*SyncSlice[V]) Len added in v2.0.10

func (s *SyncSlice[V]) Len() int

func (*SyncSlice[V]) Make added in v2.0.11

func (s *SyncSlice[V]) Make(length int, capacity ...int) *SyncSlice[V]

func (*SyncSlice[V]) Range added in v2.0.10

func (s *SyncSlice[V]) Range(f func(i int, v V) bool)

func (*SyncSlice[V]) Set added in v2.0.11

func (s *SyncSlice[V]) Set(i int, v V)

Jump to

Keyboard shortcuts

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