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
v1.1.9-beta.0
Published
Feb 23, 2016
Platform
linux/amd64
Imports
2 packages
Last checked
1 minute ago

Tools for package owners.