- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 178 for rawbuffer (0.14 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/audit_test.go
}{ { "get", func(server string) (*http.Request, error) { return http.NewRequest("GET", server+"/"+prefix+"/"+testGroupVersion.Group+"/"+testGroupVersion.Version+"/namespaces/other/simple/c", bytes.NewBuffer(simpleFooJSON)) }, 200, 2, []eventCheck{ noRequestBody(1), responseBodyMatches(1, `{.*"name":"c".*}`),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Oct 14 23:04:34 UTC 2022 - 12.1K bytes - Viewed (0) -
src/bytes/buffer_test.go
} s += string(fub) check(t, testname+" (fill 4)", buf, s) } return s } func TestNewBuffer(t *testing.T) { buf := NewBuffer(testBytes) check(t, "NewBuffer", buf, testString) } var buf Buffer // Calling NewBuffer and immediately shallow copying the Buffer struct // should not result in any allocations. // This can be used to reset the underlying []byte of an existing Buffer.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:31:36 UTC 2024 - 18.6K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go
jsonBytes := bytes.NewBuffer(nil) if err := c.JSON.Encode(obj, jsonBytes); err != nil { t.Fatalf("error encoding json: %v", err) } yamlBytes := bytes.NewBuffer(nil) if err := c.YAML.Encode(obj, yamlBytes); err != nil { t.Fatalf("error encoding yaml: %v", err) } protoBytes := bytes.NewBuffer(nil) if err := c.Proto.Encode(obj, protoBytes); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 08 16:38:32 UTC 2023 - 17.8K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter_test.go
for _, test := range tests { // Create the table from the columns and rows. table := &metav1.Table{ ColumnDefinitions: test.columns, Rows: test.rows, } // Print the table out := bytes.NewBuffer([]byte{}) printer := NewTablePrinter(test.options) printer.PrintObj(table, out) // Validate the printed table is empty. if len(out.String()) > 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Oct 30 15:08:43 UTC 2022 - 24.4K bytes - Viewed (0) -
guava/src/com/google/common/escape/CharEscaper.java
int sizeNeeded = destIndex + charsSkipped + rlen; if (destSize < sizeNeeded) { destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index); dest = growBuffer(dest, destIndex, destSize); } // If we have skipped any characters, we need to copy them now. if (charsSkipped > 0) { s.getChars(lastEscape, index, dest, destIndex);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 6.7K bytes - Viewed (0) -
src/cmd/internal/edit/edit.go
return x[i].start < x[j].start } return x[i].end < x[j].end } // NewBuffer returns a new buffer to accumulate changes to an initial data slice. // The returned buffer maintains a reference to the data, so the caller must ensure // the data is not modified until after the Buffer is done being used. func NewBuffer(data []byte) *Buffer { return &Buffer{old: data} } func (b *Buffer) Insert(pos int, new string) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 13 14:59:26 UTC 2017 - 2.5K bytes - Viewed (0) -
src/compress/flate/writer_test.go
// Fail after 'fail' writes ew := &errorWriter{N: fail} w, err := NewWriter(ew, l) if err != nil { t.Fatalf("NewWriter: level %d: %v", l, err) } n, err := io.CopyBuffer(w, struct{ io.Reader }{bytes.NewBuffer(in)}, copyBuffer) if err == nil { t.Fatalf("Level %d: Expected an error, writer was %#v", l, ew) } n2, err := w.Write([]byte{1, 2, 2, 3, 4, 5}) if n2 != 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 5.4K bytes - Viewed (0) -
android/guava/src/com/google/common/escape/CharEscaper.java
int sizeNeeded = destIndex + charsSkipped + rlen; if (destSize < sizeNeeded) { destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index); dest = growBuffer(dest, destIndex, destSize); } // If we have skipped any characters, we need to copy them now. if (charsSkipped > 0) { s.getChars(lastEscape, index, dest, destIndex);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Jan 18 20:55:09 UTC 2022 - 6.7K bytes - Viewed (0) -
src/cmd/internal/edit/edit_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package edit import "testing" func TestEdit(t *testing.T) { b := NewBuffer([]byte("0123456789")) b.Insert(8, ",7½,") b.Replace(9, 10, "the-end") b.Insert(10, "!") b.Insert(4, "3.14,") b.Insert(4, "π,") b.Insert(4, "3.15,") b.Replace(3, 4, "three,")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 13 14:59:26 UTC 2017 - 653 bytes - Viewed (0) -
docs/debugging/healing-bin/main.go
r, err := file.Open() if err != nil { return err } b, err := io.ReadAll(r) if err != nil { return err } buf := bytes.NewBuffer(nil) if _, err = msgp.CopyToJSON(buf, bytes.NewReader(b)); err != nil { return err } dec := json.NewDecoder(buf) // Use number to preserve integers. dec.UseNumber()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.2K bytes - Viewed (0)