Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 198 for butter (0.15 sec)

  1. src/bytes/buffer.go

    // The slice aliases the buffer content at least until the next buffer modification,
    // so immediate changes to the slice will affect the result of future reads.
    func (b *Buffer) Bytes() []byte { return b.buf[b.off:] }
    
    // AvailableBuffer returns an empty buffer with b.Available() capacity.
    // This buffer is intended to be appended to and
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  2. src/bytes/buffer_test.go

    	// Confirm that when Reader panics, the empty buffer remains empty
    	var buf2 Buffer
    	defer func() {
    		recover()
    		check(t, "TestReadFromPanicReader (2)", &buf2, "")
    	}()
    	buf2.ReadFrom(panicReader{panic: true})
    }
    
    func TestReadFromNegativeReader(t *testing.T) {
    	var b Buffer
    	defer func() {
    		switch err := recover().(type) {
    		case nil:
    			t.Fatal("bytes.Buffer.ReadFrom didn't panic")
    		case error:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  3. cmd/data-usage-cache_gen_test.go

    	v := allTierStats{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeallTierStats(b *testing.B) {
    	v := allTierStats{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Jan 13 07:51:08 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  4. cmd/batch-replicate_gen_test.go

    	v := BatchJobReplicateCredentials{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobReplicateCredentials(b *testing.B) {
    	v := BatchJobReplicateCredentials{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 14.2K bytes
    - Viewed (1)
  5. cmd/last-minute_gen_test.go

    func BenchmarkEncodeAccElem(b *testing.B) {
    	v := AccElem{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeAccElem(b *testing.B) {
    	v := AccElem{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jul 05 21:45:49 GMT 2022
    - 6.8K bytes
    - Viewed (0)
  6. cmd/batch-expire_gen_test.go

    	v := BatchJobExpire{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBatchJobExpire(b *testing.B) {
    	v := BatchJobExpire{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Dec 02 10:51:33 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  7. cmd/streaming-signature-v4.go

    	}
    	if b != '\n' {
    		cr.err = errMalformedEncoding
    		return n, cr.err
    	}
    
    	if cap(cr.buffer) < size {
    		cr.buffer = make([]byte, size)
    	} else {
    		cr.buffer = cr.buffer[:size]
    	}
    
    	// Now, we read the payload and compute its SHA-256 hash.
    	_, err = io.ReadFull(cr.reader, cr.buffer)
    	if err == io.EOF && size != 0 {
    		err = io.ErrUnexpectedEOF
    	}
    	if err != nil && err != io.EOF {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  8. cmd/tier-last-day-stats_gen_test.go

    	v := DailyAllTierStats{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeDailyAllTierStats(b *testing.B) {
    	v := DailyAllTierStats{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. src/archive/zip/example_test.go

    package zip_test
    
    import (
    	"archive/zip"
    	"bytes"
    	"compress/flate"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func ExampleWriter() {
    	// Create a buffer to write our archive to.
    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    	// Add some files to the archive.
    	var files = []struct {
    		Name, Body string
    	}{
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  10. internal/config/crypto.go

    		return nil, errors.New("config: encryption metadata is too large")
    	}
    	header[0] = Version
    	binary.LittleEndian.PutUint32(header[1:], uint32(len(metadata)))
    	buffer.Write(header[:])
    	buffer.Write(metadata)
    
    	return io.MultiReader(
    		&buffer,
    		stream.EncryptReader(plaintext, nonce, nil),
    	), nil
    }
    
    // Decrypt decrypts the ciphertext using a key managed by the KMS.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 4.8K bytes
    - Viewed (0)
Back to top