- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 38 for nilslice (0.17 sec)
-
test/noinit.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 14 17:57:36 UTC 2023 - 6.8K bytes - Viewed (0) -
pkg/util/slice/slice.go
newSlice := make([]string, 0) for _, item := range slice { if item == s { continue } if modifier != nil && modifier(item) == s { continue } newSlice = append(newSlice, item) } if len(newSlice) == 0 { // Sanitize for unit tests so we don't need to distinguish empty array // and nil. newSlice = nil } return newSlice
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 21 19:03:53 UTC 2019 - 2.1K bytes - Viewed (0) -
test/named.go
isMap(Map{}) asSlice(slice) isSlice(slice) asSlice(make(Slice, 5)) isSlice(make(Slice, 5)) asSlice([]byte{1, 2, 3}) asSlice([]byte{1, 2, 3}[0:2]) asSlice(slice[0:4]) isSlice(slice[0:4]) asSlice(slice[3:8]) isSlice(slice[3:8]) asSlice(nil) asSlice(Slice(nil)) isSlice(Slice(nil)) slice = nil asSlice(Slice{1, 2, 3}) isSlice(Slice{1, 2, 3}) asSlice(Slice{})
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 4.6K bytes - Viewed (0) -
src/runtime/iface_test.go
zero64I T64 = 0 one64 uint64 = 1 thousand64 uint64 = 1000 zerostr string = "" zerostrI Tstr = "" nzstr string = "abc" zeroslice []byte = nil zerosliceI Tslice = nil nzslice []byte = []byte("abc") zerobig [512]byte nzbig [512]byte = [512]byte{511: 1} ) func BenchmarkConvT2Ezero(b *testing.B) { b.Run("zero", func(b *testing.B) { b.Run("16", func(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 7.5K bytes - Viewed (0) -
src/sort/sort_impl_120.go
// license that can be found in the LICENSE file. //go:build !go1.21 package sort func intsImpl(x []int) { Sort(IntSlice(x)) } func float64sImpl(x []float64) { Sort(Float64Slice(x)) } func stringsImpl(x []string) { Sort(StringSlice(x)) } func intsAreSortedImpl(x []int) bool { return IsSorted(IntSlice(x)) } func float64sAreSortedImpl(x []float64) bool { return IsSorted(Float64Slice(x)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jul 21 13:00:18 UTC 2023 - 602 bytes - Viewed (0) -
src/go/types/instantiate_test.go
{ "package differenttypeargs; type T[P any] int", "T", []Type{Typ[Int]}, "T", []Type{Typ[String]}, false, }, { "package typeslice; type T[P any] int", "T", []Type{NewSlice(Typ[Int])}, "T", []Type{NewSlice(Typ[Int])}, true, }, { // interface{interface{...}} is equivalent to interface{...} "package equivalentinterfaces; type T[P any] int", "T", []Type{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 5.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/slice.go
// license that can be found in the LICENSE file. package types2 // A Slice represents a slice type. type Slice struct { elem Type } // NewSlice returns a new slice type for the given element type. func NewSlice(elem Type) *Slice { return &Slice{elem: elem} } // Elem returns the element type of slice s. func (s *Slice) Elem() Type { return s.elem } func (s *Slice) Underlying() Type { return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 01 22:17:50 UTC 2021 - 577 bytes - Viewed (0) -
src/go/types/slice.go
// license that can be found in the LICENSE file. package types // A Slice represents a slice type. type Slice struct { elem Type } // NewSlice returns a new slice type for the given element type. func NewSlice(elem Type) *Slice { return &Slice{elem: elem} } // Elem returns the element type of slice s. func (s *Slice) Elem() Type { return s.elem } func (s *Slice) Underlying() Type { return s }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 701 bytes - Viewed (0) -
test/typeparam/issue51925.go
} return result } func min[T IntLike](x, y T) T { if x < y { return x } return y } // Min returns the minimum element of `nums`. func Min[T IntLike, NumSlice ~[]T](nums NumSlice) T { if len(nums) == 0 { return T(0) } return Reduce(min[T], nums, nums[0]) } // VarMin is the variadic version of Min. func VarMin[T IntLike](nums ...T) T { return Min(nums) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 963 bytes - Viewed (0) -
staging/src/k8s.io/api/testdata/v1.30.0/resource.k8s.io.v1alpha2.ResourceSlice.yaml
name: nameValue uid: uidValue resourceVersion: resourceVersionValue selfLink: selfLinkValue uid: uidValue namedResources: instances: - attributes: - bool: true int: 7 intSlice: ints: - 1 name: nameValue quantity: "0" string: stringValue stringSlice: strings: - stringsValue version: versionValue name: nameValue
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 08:52:25 UTC 2024 - 1.2K bytes - Viewed (0)