Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 947 for asSlice (0.15 sec)

  1. test/typeparam/issue52117.dir/a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    func Compare[T int | uint](a, b T) int {
    	return 0
    }
    
    type Slice[T int | uint] struct{}
    
    func (l Slice[T]) Comparator() func(v1, v2 T) int {
    	return Compare[T]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 28 20:14:34 UTC 2022
    - 333 bytes
    - Viewed (0)
  2. pkg/proxy/config/config_test.go

    	namespacedName := types.NamespacedName{Namespace: slice.Namespace, Name: slice.Name}
    	h.state[namespacedName] = slice
    	h.sendEndpointSlices()
    }
    
    func (h *EndpointSliceHandlerMock) OnEndpointSliceDelete(slice *discoveryv1.EndpointSlice) {
    	h.lock.Lock()
    	defer h.lock.Unlock()
    	namespacedName := types.NamespacedName{Namespace: slice.Namespace, Name: slice.Name}
    	delete(h.state, namespacedName)
    	h.sendEndpointSlices()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. test/fixedbugs/issue19323.go

    package p
    
    func g() {}
    
    func f() {
    	g()[:] // ERROR "g.* used as value|attempt to slice object that is not"
    }
    
    func g2() ([]byte, []byte) { return nil, nil }
    
    func f2() {
    	g2()[:] // ERROR "multiple-value g2.* in single-value context|attempt to slice object that is not|2\-valued g"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 23 19:41:41 UTC 2021
    - 460 bytes
    - Viewed (0)
  4. src/internal/types/testdata/check/go1_19.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Check Go language version-specific errors.
    
    package p
    
    type Slice []byte
    type Array [8]byte
    
    var s Slice
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 343 bytes
    - Viewed (0)
  5. src/internal/types/testdata/check/go1_21_19.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Check Go language version-specific errors.
    
    //go:build go1.19
    
    package p
    
    type Slice []byte
    type Array [8]byte
    
    var s Slice
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:08:31 UTC 2023
    - 362 bytes
    - Viewed (0)
  6. test/fixedbugs/issue35291.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Check error message for duplicated index in slice literal
    
    package p
    
    var s = []string{
    	1: "dup",
    	1: "dup", // ERROR "duplicate index in slice literal: 1|duplicate value for index 1|duplicate index 1"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 22 17:50:13 UTC 2020
    - 383 bytes
    - Viewed (0)
  7. test/fixedbugs/issue46938.go

    	"unsafe"
    )
    
    func main() {
    	defer func() {
    		err := recover()
    		if err == nil {
    			panic("expected panic")
    		}
    		if got := err.(error).Error(); !strings.Contains(got, "slice bounds out of range") {
    			panic("expected panic slice out of bound, got " + got)
    		}
    	}()
    	s := make([]int64, 100)
    	p := unsafe.Pointer(&s[0])
    	n := 1000
    
    	_ = (*[10]int64)(p)[:n:n]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 25 01:57:42 UTC 2021
    - 584 bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go

    //sys	sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
    //sys	setfsgid(gid int) (prev int, err error)
    //sys	setfsuid(uid int) (prev int, err error)
    //sys	Shutdown(fd int, how int) (err error)
    //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
    
    func Stat(path string, stat *Stat_t) (err error) {
    	// Use fstatat, because Android's seccomp policy blocks stat.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  9. src/go/types/subst.go

    		}
    
    	case *Array:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Array{len: t.len, elem: elem}
    		}
    
    	case *Slice:
    		elem := subst.typOrNil(t.elem)
    		if elem != t.elem {
    			return &Slice{elem: elem}
    		}
    
    	case *Struct:
    		if fields, copied := subst.varList(t.fields); copied {
    			s := &Struct{fields: fields, tags: t.tags}
    			s.markComplete()
    			return s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/decompose.go

    				}
    				f.NamedValues[*ptrName] = append(f.NamedValues[*ptrName], v.Args[0])
    				f.NamedValues[*lenName] = append(f.NamedValues[*lenName], v.Args[1])
    				toDelete = append(toDelete, namedVal{i, j})
    			}
    		case t.IsSlice():
    			ptrName, lenName, capName := f.SplitSlice(name)
    			newNames = maybeAppend2(f, newNames, ptrName, lenName)
    			newNames = maybeAppend(f, newNames, capName)
    			for j, v := range f.NamedValues[*name] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 21:22:15 UTC 2022
    - 13.4K bytes
    - Viewed (0)
Back to top