mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
vendor updates
This commit is contained in:
3
vendor/k8s.io/kubernetes/pkg/kubectl/util/slice/BUILD
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/kubectl/util/slice/BUILD
generated
vendored
@ -15,8 +15,7 @@ go_library(
|
||||
go_test(
|
||||
name = "go_default_test",
|
||||
srcs = ["slice_test.go"],
|
||||
importpath = "k8s.io/kubernetes/pkg/kubectl/util/slice",
|
||||
library = ":go_default_library",
|
||||
embed = [":go_default_library"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
|
10
vendor/k8s.io/kubernetes/pkg/kubectl/util/slice/slice.go
generated
vendored
10
vendor/k8s.io/kubernetes/pkg/kubectl/util/slice/slice.go
generated
vendored
@ -20,13 +20,5 @@ import (
|
||||
"sort"
|
||||
)
|
||||
|
||||
// Int64Slice attaches the methods of Interface to []int64,
|
||||
// sorting in increasing order.
|
||||
type Int64Slice []int64
|
||||
|
||||
func (p Int64Slice) Len() int { return len(p) }
|
||||
func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] }
|
||||
func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
|
||||
|
||||
// Sorts []int64 in increasing order
|
||||
func SortInts64(a []int64) { sort.Sort(Int64Slice(a)) }
|
||||
func SortInts64(a []int64) { sort.Slice(a, func(i, j int) bool { return a[i] < a[j] }) }
|
||||
|
Reference in New Issue
Block a user