kubernetesk8s.io/kubernetes/pkg/util/slice Index | Files

package slice

import "k8s.io/kubernetes/pkg/util/slice"

Package slice provides utility methods for common operations on slices.

Index

Functions

func CopyStrings

func CopyStrings(s []string) []string

CopyStrings copies the contents of the specified string slice into a new slice.

func ShuffleStrings

func ShuffleStrings(s []string) []string

ShuffleStrings copies strings from the specified slice into a copy in random order. It returns a new slice.

func SortStrings

func SortStrings(s []string) []string

SortStrings sorts the specified string slice in place. It returns the same slice that was provided in order to facilitate method chaining.

Source Files

slice.go

Version
v0.14.1
Published
Apr 1, 2015
Platform
windows/amd64
Imports
2 packages
Last checked
13 seconds ago

Tools for package owners.