Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for nilslice (0.16 sec)

  1. test/noinit.go

    	sliceInt                  = []int{1, 2, 3}
    	hello                     = "hello, world"
    	bytes                     = []byte("hello, world")
    	four, five                = 4, 5
    	x, y                      = 0.1, "hello"
    	nilslice   []byte         = nil
    	nilmap     map[string]int = nil
    	nilfunc    func()         = nil
    	nilchan    chan int       = nil
    	nilptr     *byte          = nil
    )
    
    var a = [3]int{1001, 1002, 1003}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 17:57:36 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/compile/internal/ssa/_gen/allocators.go

    		},
    		{
    			name: "IntSlice",
    			typ:  "[]int",
    			base: "Int64Slice",
    		},
    		{
    			name: "Int32Slice",
    			typ:  "[]int32",
    			base: "Int64Slice",
    		},
    		{
    			name: "Int8Slice",
    			typ:  "[]int8",
    			base: "Int64Slice",
    		},
    		{
    			name: "BoolSlice",
    			typ:  "[]bool",
    			base: "Int64Slice",
    		},
    		{
    			name: "IDSlice",
    			typ:  "[]ID",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/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: Fri Apr 28 17:58:07 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/testdata/HEAD/resource.k8s.io.v1alpha2.ResourceSlice.json

          {
            "name": "nameValue",
            "attributes": [
              {
                "name": "nameValue",
                "quantity": "0",
                "bool": true,
                "int": 7,
                "intSlice": {
                  "ints": [
                    1
                  ]
                },
                "string": "stringValue",
                "stringSlice": {
                  "strings": [
                    "stringsValue"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 1.8K bytes
    - Viewed (0)
Back to top