Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 236 for slice (0.24 sec)

  1. src/fmt/doc.go

    	%X	upper-case hexadecimal notation, e.g. -0X1.23ABCP+20
    
    String and slice of bytes (treated equivalently with these verbs):
    
    	%s	the uninterpreted bytes of the string or slice
    	%q	a double-quoted string safely escaped with Go syntax
    	%x	base 16, lower-case, two characters per byte
    	%X	base 16, upper-case, two characters per byte
    
    Slice:
    
    	%p	address of 0th element in base 16 notation, with leading 0x
    
    Pointer:
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  2. src/encoding/binary/binary_test.go

    func TestReadSlice(t *testing.T) {
    	t.Run("Read", func(t *testing.T) {
    		slice := make([]int32, 2)
    		err := Read(bytes.NewReader(src), BigEndian, slice)
    		checkResult(t, "ReadSlice", BigEndian, err, slice, res)
    	})
    
    	t.Run("Decode", func(t *testing.T) {
    		slice := make([]int32, 2)
    		_, err := Decode(src, BigEndian, slice)
    		checkResult(t, "ReadSlice", BigEndian, err, slice, res)
    	})
    }
    
    func TestWriteSlice(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  3. src/encoding/asn1/asn1.go

    // a number of ASN.1 values from the given byte slice and returns them as a
    // slice of Go values of the given type.
    func parseSequenceOf(bytes []byte, sliceType reflect.Type, elemType reflect.Type) (ret reflect.Value, err error) {
    	matchAny, expectedTag, compoundType, ok := getUniversalType(elemType)
    	if !ok {
    		err = StructuralError{"unknown Go type for slice"}
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 31.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go

    	//  var i string
    	//  var _ = s[i]
    	InvalidIndex
    
    	// SwappedSliceIndices occurs when constant indices in a slice expression
    	// are decreasing in value.
    	//
    	// Example:
    	//  var _ = []int{1,2,3}[2:1]
    	SwappedSliceIndices
    
    	/* operators > slice */
    
    	// NonSliceableOperand occurs when a slice operation is applied to a value
    	// whose type is not sliceable, or is unaddressable.
    	//
    	// Example:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 34K bytes
    - Viewed (0)
  5. src/encoding/csv/reader.go

    	// This is done even if the field delimiter, Comma, is white space.
    	TrimLeadingSpace bool
    
    	// ReuseRecord controls whether calls to Read may return a slice sharing
    	// the backing array of the previous call's returned slice for performance.
    	// By default, each call to Read returns newly allocated memory owned by the caller.
    	ReuseRecord bool
    
    	// Deprecated: TrailingComma is no longer used.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:32:28 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/builtins_test.go

    	{"Sizeof", `var x P; _ = unsafe.Sizeof(x)`, `func(P) uintptr`},
    
    	{"Slice", `var p *int; _ = unsafe.Slice(p, 1)`, `func(*int, int) []int`},
    	{"Slice", `var p *byte; var n uintptr; _ = unsafe.Slice(p, n)`, `func(*byte, uintptr) []byte`},
    	{"Slice", `type B *byte; var b B; _ = unsafe.Slice(b, 0)`, `func(*byte, int) []byte`},
    
    	{"SliceData", "var s []int; _ = unsafe.SliceData(s)", `func([]int) *int`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 18:06:31 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. src/crypto/aes/gcm_s390x.go

    }
    
    func (g *gcmAsm) Overhead() int {
    	return g.tagSize
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  8. src/crypto/cipher/gcm.go

    	byteorder.BePutUint32(ctr, byteorder.BeUint32(ctr)+1)
    }
    
    // sliceForAppend takes a slice and a requested number of bytes. It returns a
    // slice with the contents of the given slice followed by that many bytes and a
    // second slice that aliases into it and contains only the extra bytes. If the
    // original slice has sufficient capacity then no allocation is performed.
    func sliceForAppend(in []byte, n int) (head, tail []byte) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/typecheck.go

    	t := r.Type()
    	if t == nil {
    		return false
    	}
    	if !t.IsInteger() {
    		base.Errorf("invalid slice index %v (type %v)", r, t)
    		return false
    	}
    
    	if r.Op() == ir.OLITERAL {
    		x := r.Val()
    		if constant.Sign(x) < 0 {
    			base.Errorf("invalid slice index %v (index must be non-negative)", r)
    			return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  10. src/crypto/tls/key_agreement.go

    func hashForServerKeyExchange(sigType uint8, hashFunc crypto.Hash, version uint16, slices ...[]byte) []byte {
    	if sigType == signatureEd25519 {
    		var signed []byte
    		for _, slice := range slices {
    			signed = append(signed, slice...)
    		}
    		return signed
    	}
    	if version >= VersionTLS12 {
    		h := hashFunc.New()
    		for _, slice := range slices {
    			h.Write(slice)
    		}
    		digest := h.Sum(nil)
    		return digest
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top