- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 178 for rawbuffer (0.15 sec)
-
src/cmd/internal/obj/loong64/asm_test.go
dir, err := os.MkdirTemp("", "testlargebranch") if err != nil { t.Fatalf("Could not create directory: %v", err) } defer os.RemoveAll(dir) // Generate a very large function. buf := bytes.NewBuffer(make([]byte, 0, genBufSize)) genLargeBranch(buf) tmpfile := filepath.Join(dir, "x.s") if err := os.WriteFile(tmpfile, buf.Bytes(), 0644); err != nil { t.Fatalf("Failed to write file: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 17:39:37 UTC 2024 - 2.2K bytes - Viewed (0) -
cmd/bucket-metadata.go
if err != nil { return } outbuf := bytes.NewBuffer(nil) objectKey := crypto.GenerateKey(key.Plaintext, rand.Reader) sealedKey := objectKey.Seal(key.Plaintext, crypto.GenerateIV(rand.Reader), crypto.S3.String(), bucket, "") crypto.S3.CreateMetadata(metadata, key.KeyID, key.Ciphertext, sealedKey)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 16.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming/streaming_test.go
d.got = data return d.obj, nil, d.err } func TestEmptyDecoder(t *testing.T) { buf := bytes.NewBuffer([]byte{}) d := &fakeDecoder{} _, _, err := NewDecoder(ioutil.NopCloser(buf), d).Decode(nil, nil) if err != io.EOF { t.Fatal(err) } } func TestDecoder(t *testing.T) { frames := [][]byte{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Dec 14 11:43:39 UTC 2018 - 2.2K bytes - Viewed (0) -
pkg/test/csrctrl/signer/signer.go
}) if err != nil { return nil, err } _, err = x509.ParseCertificate(der) if err != nil { return nil, fmt.Errorf("error decoding DER certificate bytes: %s", err.Error()) } pemBytes := bytes.NewBuffer([]byte{}) err = pem.Encode(pemBytes, &pem.Block{Type: "CERTIFICATE", Bytes: der}) if err != nil { return nil, fmt.Errorf("error encoding certificate PEM: %s", err.Error()) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Dec 03 18:57:19 UTC 2021 - 2.5K bytes - Viewed (0) -
internal/ringbuffer/README.md
fmt.Println(rb.Length()) fmt.Println(rb.Free()) // read buf := make([]byte, 4) rb.Read(buf) fmt.Println(string(buf)) } ``` It is possible to use an existing buffer with by replacing `New` with `NewBuffer`. # Blocking vs Non-blocking The default behavior of the ring buffer is non-blocking, meaning that reads and writes will return immediately with an error if the operation cannot be completed.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 2.1K bytes - Viewed (0) -
internal/s3select/csv/reader_contrib_test.go
r, err := NewReader(io.NopCloser(bytes.NewBuffer(f)), &args) if err != nil { b.Fatalf("Reading init failed with %s", err) } defer r.Close() b.ReportAllocs() b.ResetTimer() b.SetBytes(int64(len(f))) var record sql.Record for i := 0; i < b.N; i++ { r, err = NewReader(io.NopCloser(bytes.NewBuffer(f)), &args) if err != nil { b.Fatalf("Reading init failed with %s", err)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 38.5K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue18146.go
args := append(append([]string(nil), os.Args[1:]...), "-test.run=^Test18146$") for n := attempts; n > 0; n-- { cmd := exec.Command(os.Args[0], args...) cmd.Env = append(os.Environ(), "test18146=exec") buf := bytes.NewBuffer(nil) cmd.Stdout = buf cmd.Stderr = buf if err := cmd.Start(); err != nil { // We are starting so many processes that on // some systems (problem seen on Darwin,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 2.8K bytes - Viewed (0) -
cmd/dependencycheck/dependencycheck.go
} } b, err := os.ReadFile(args[0]) if err != nil { log.Fatalf("Error reading dependencies file: %v", err) } packages := []goPackage{} decoder := json.NewDecoder(bytes.NewBuffer(b)) for { pkg := goPackage{} if err := decoder.Decode(&pkg); err != nil { if err == io.EOF { break } log.Fatalf("Error unmarshaling dependencies file: %v", err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 01 05:59:41 UTC 2022 - 3K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient.go
eventData, err := json.Marshal(addEvent) if err != nil { return err } var response *http.Response response, err = cniClient.client.Post(cniClient.url, "application/json", bytes.NewBuffer(eventData)) if err != nil { return err } defer response.Body.Close() if response.StatusCode != http.StatusOK { return fmt.Errorf("unable to push CNI event, error was %d", response.StatusCode) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 2.4K bytes - Viewed (0) -
pkg/wasm/imagefetcher_test.go
diffID v1.Hash mediaType types.MediaType } func (r *mockLayer) DiffID() (v1.Hash, error) { return v1.Hash{}, nil } func (r *mockLayer) Uncompressed() (io.ReadCloser, error) { return io.NopCloser(bytes.NewBuffer(r.raw)), nil } func (r *mockLayer) MediaType() (types.MediaType, error) { return r.mediaType, nil } func TestExtractOCIArtifactImage(t *testing.T) { t.Run("valid", func(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Feb 05 04:15:17 UTC 2023 - 16.3K bytes - Viewed (0)