slicesmaps

package module
v0.0.0-...-eae5253 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 2 Imported by: 0

README

Slices and Maps

Description

Checking out some of the new packages in Go 1.21 - slices and maps

Simple set of wrapper methods applied to example types with basic unit tests against each to check out their functionality. These new packages seem rather useful for common slice and map operations that Go previously left to the coder to find their own solution on.

Just for my own interest and curiousity, rather than to add anything of particular value :)

Notes

Includes a Makefile - run tests with make test or get coverage with make test-coverage

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapEx

type MapEx map[string]string

func (MapEx) CloneMap

func (m MapEx) CloneMap() MapEx

func (MapEx) CopyMap

func (m MapEx) CopyMap(m1 MapEx)

func (MapEx) DeleteKeyFromMap

func (m MapEx) DeleteKeyFromMap(n string)

func (MapEx) DeleteValueFromMap

func (m MapEx) DeleteValueFromMap(n string)

func (MapEx) EqualMap

func (m MapEx) EqualMap(m1 MapEx) bool

type SliceEx

type SliceEx []int

func (SliceEx) CloneSlice

func (s SliceEx) CloneSlice() SliceEx

func (SliceEx) CompactSlice

func (s SliceEx) CompactSlice() SliceEx

func (SliceEx) CompareSlice

func (s1 SliceEx) CompareSlice(s2 SliceEx) int

func (SliceEx) ContainsSlice

func (s SliceEx) ContainsSlice(n int) bool

func (SliceEx) DeleteSlice

func (s SliceEx) DeleteSlice(a, b int) SliceEx

func (SliceEx) IndexSlice

func (s SliceEx) IndexSlice(i int) int

func (SliceEx) InsertSlice

func (s SliceEx) InsertSlice(i, v int) SliceEx

func (SliceEx) IsSortedSlice

func (s SliceEx) IsSortedSlice() bool

func (SliceEx) MaxSlice

func (s SliceEx) MaxSlice() int

func (SliceEx) MinSlice

func (s SliceEx) MinSlice() int

func (SliceEx) ReplaceSlice

func (s SliceEx) ReplaceSlice(i, j, v int) SliceEx

func (SliceEx) ReverseSlice

func (s SliceEx) ReverseSlice()

func (SliceEx) SortSlice

func (s SliceEx) SortSlice()

Jump to

Keyboard shortcuts

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