sliceclone

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: BSD-3-Clause Imports: 0 Imported by: 18

Documentation

Overview

Package sliceclone provides those basic slice cloning methods that I finally got tired of rewriting all the time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(sl []bool) []bool

Bool returns a cloned copy of the given bool slice -- returns nil if slice has zero length

func Byte added in v0.9.11

func Byte(sl []byte) []byte

Byte returns a cloned copy of the given byte slice -- returns nil if slice has zero length

func Float32

func Float32(sl []float32) []float32

Float32 returns a cloned copy of the given float32 slice -- returns nil if slice has zero length

func Float64

func Float64(sl []float64) []float64

Float64 returns a cloned copy of the given float64 slice -- returns nil if slice has zero length

func Int

func Int(sl []int) []int

Int returns a cloned copy of the given int slice -- returns nil if slice has zero length

func Int32

func Int32(sl []int32) []int32

Int32 returns a cloned copy of the given int32 slice -- returns nil if slice has zero length

func Int64

func Int64(sl []int64) []int64

Int64 returns a cloned copy of the given int64 slice -- returns nil if slice has zero length

func Rune added in v0.9.11

func Rune(sl []rune) []rune

Rune returns a cloned copy of the given rune slice -- returns nil if slice has zero length

func String

func String(sl []string) []string

String returns a cloned copy of the given string slice -- returns nil if slice has zero length

func StringExclude added in v1.1.5

func StringExclude(sl, exclude []string) []string

StringExclude returns a cloned copy of the given string slice while excluding the list of specific items

Types

This section is empty.

Jump to

Keyboard shortcuts

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