Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 392 for asSlice (0.35 sec)

  1. src/go/types/slice.go

    // Source: ../../cmd/compile/internal/types2/slice.go
    
    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // 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} }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 701 bytes
    - Viewed (0)
  2. src/sort/slice.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package sort
    
    import (
    	"internal/reflectlite"
    	"math/bits"
    )
    
    // Slice sorts the slice x given the provided less function.
    // It panics if x is not a slice.
    //
    // The sort is not guaranteed to be stable: equal elements
    // may be reversed from their original order.
    // For a stable sort, use [SliceStable].
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/lex/slice.go

    	"cmd/internal/src"
    )
    
    // A Slice reads from a slice of Tokens.
    type Slice struct {
    	tokens []Token
    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    	return &Slice{
    		tokens: tokens,
    		base:   base,
    		line:   line,
    		pos:    -1, // Next will advance to zero.
    	}
    }
    
    func (s *Slice) Next() ScanToken {
    	s.pos++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 29 22:49:50 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/slice.go

    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)
  5. releasenotes/notes/endpoint-slice.yaml

    Steven Landow <******@****.***> 1636742042 -0800
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Nov 12 18:34:02 UTC 2021
    - 322 bytes
    - Viewed (0)
  6. src/sort/example_test.go

    	fmt.Println("By age,name:", people)
    
    	// Output: By name: [{Alice 25} {Alice 75} {Alice 75} {Bob 75} {Bob 25} {Colin 25} {Elizabeth 75} {Elizabeth 25}]
    	// By age,name: [{Alice 25} {Bob 25} {Colin 25} {Elizabeth 25} {Alice 75} {Alice 75} {Bob 75} {Elizabeth 75}]
    }
    
    func ExampleStrings() {
    	s := []string{"Go", "Bravo", "Gopher", "Alpha", "Grin", "Delta"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:29:29 UTC 2017
    - 2.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/runtime/splice_test.go

    				sb.Splice(testBytes0)
    				buf.Write(testBytes0)
    
    				sb.Reset()
    				buf.Reset()
    			},
    		},
    		{
    			name: "Write/Splice, Reset, Write/Splice",
    			run: func(sb runtime.Splice, buf *bytes.Buffer) {
    				sb.Splice(testBytes0)
    				buf.Write(testBytes0)
    
    				sb.Reset()
    				buf.Reset()
    
    				sb.Splice(testBytes1)
    				buf.Write(testBytes1)
    			},
    		},
    		{
    			name: "Write, Reset, Splice",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 18:03:48 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  8. src/internal/poll/splice_linux.go

    // splice wraps the splice system call. Since the current implementation
    // only uses splice on sockets and pipes, the offset arguments are unused.
    // splice returns int instead of int64, because callers never ask it to
    // move more data in a single call than can fit in an int32.
    func splice(out int, in int, max int, flags int) (int, error) {
    	n, err := syscall.Splice(in, nil, out, nil, max, flags)
    	return int(n), err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  9. src/os/zero_copy_linux.go

    	// Streams benefit the most from the splice(2), non-streams are not even supported in old kernels
    	// where splice(2) will just return EINVAL; newer kernels support non-streams like UDP, but I really
    	// doubt that splice(2) could help non-streams, cuz they usually send small frames respectively
    	// and one splice call would result in one frame.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. istioctl/pkg/util/proto/messageslice.go

    type MessageSlice []proto.Message
    
    // MarshalJSON handles marshaling of slices of proto messages
    func (pSlice MessageSlice) MarshalJSON() ([]byte, error) {
    	buffer := bytes.NewBufferString("[")
    	sliceLength := len(pSlice)
    	for index, msg := range pSlice {
    		b, err := protomarshal.Marshal(msg)
    		if err != nil {
    			return nil, err
    		}
    		buffer.Write(b)
    		if index < sliceLength-1 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 19 21:53:59 UTC 2021
    - 1.3K bytes
    - Viewed (0)
Back to top