- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 89 for buf4 (0.04 sec)
-
src/bufio/bufio_test.go
} func TestWriterReset(t *testing.T) { var buf1, buf2, buf3, buf4, buf5 strings.Builder w := NewWriter(&buf1) w.WriteString("foo") w.Reset(&buf2) // and not flushed w.WriteString("bar") w.Flush() if buf1.String() != "" { t.Errorf("buf1 = %q; want empty", buf1.String()) } if buf2.String() != "bar" { t.Errorf("buf2 = %q; want bar", buf2.String()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0) -
test/escape2.go
arr [64]byte arrPtr *[64]byte buf1 []byte buf2 []byte str1 string str2 string } func (b *Buffer) foo() { // ERROR "b does not escape$" b.buf1 = b.buf1[1:2] // ERROR "\(\*Buffer\).foo ignoring self-assignment in b.buf1 = b.buf1\[1:2\]$" b.buf1 = b.buf1[1:2:3] // ERROR "\(\*Buffer\).foo ignoring self-assignment in b.buf1 = b.buf1\[1:2:3\]$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0) -
test/escape2n.go
arr [64]byte arrPtr *[64]byte buf1 []byte buf2 []byte str1 string str2 string } func (b *Buffer) foo() { // ERROR "b does not escape$" b.buf1 = b.buf1[1:2] // ERROR "\(\*Buffer\).foo ignoring self-assignment in b.buf1 = b.buf1\[1:2\]$" b.buf1 = b.buf1[1:2:3] // ERROR "\(\*Buffer\).foo ignoring self-assignment in b.buf1 = b.buf1\[1:2:3\]$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0) -
test/fixedbugs/issue4099.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 509 bytes - Viewed (0) -
src/io/example_test.go
// read } func ExampleMultiWriter() { r := strings.NewReader("some io.Reader stream to be read\n") var buf1, buf2 strings.Builder w := io.MultiWriter(&buf1, &buf2) if _, err := io.Copy(w, r); err != nil { log.Fatal(err) } fmt.Print(buf1.String()) fmt.Print(buf2.String()) // Output: // some io.Reader stream to be read // some io.Reader stream to be read }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:49:32 UTC 2022 - 5.5K bytes - Viewed (0) -
src/crypto/ecdh/nist.go
panic("crypto/ecdh: internal error: isLess input too large") } bufA, bufB := make([]byte, 72), make([]byte, 72) for i := range a { bufA[i], bufB[i] = a[len(a)-i-1], b[len(b)-i-1] } // Perform a subtraction with borrow. var borrow uint64 for i := 0; i < len(bufA); i += 8 { limbA, limbB := byteorder.LeUint64(bufA[i:]), byteorder.LeUint64(bufB[i:]) _, borrow = bits.Sub64(limbA, limbB, borrow) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 8.1K bytes - Viewed (0) -
src/net/http/response_test.go
} fatalf(msg+": %v", err) } var buf bytes.Buffer buf.WriteString("HTTP/1.1 200 OK\r\n") if test.chunked { buf.WriteString("Transfer-Encoding: chunked\r\n") } else { buf.WriteString("Content-Length: 1000000\r\n") } var wr io.Writer = &buf if test.chunked { wr = internal.NewChunkedWriter(wr) } if test.compressed { buf.WriteString("Content-Encoding: gzip\r\n")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 19:01:29 UTC 2024 - 23.6K bytes - Viewed (0) -
src/io/multi_test.go
func() { buf1 := bytes.NewReader([]byte("foo")) buf2 := bytes.NewReader([]byte("bar")) mr = MultiReader(buf1, buf2) runtime.SetFinalizer(buf1, func(*bytes.Reader) { close(closed) }) }() buf := make([]byte, 4) if n, err := ReadFull(mr, buf); err != nil || string(buf) != "foob" { t.Fatalf(`ReadFull = %d (%q), %v; want 3, "foo", nil`, n, buf[:n], err) } runtime.GC()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 15:49:32 UTC 2022 - 10K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser_test.go
} func verifyPrint(t *testing.T, filename string, ast1 *File) { var buf1 bytes.Buffer _, err := Fprint(&buf1, ast1, LineForm) if err != nil { panic(err) } bytes1 := buf1.Bytes() ast2, err := Parse(NewFileBase(filename), &buf1, nil, nil, 0) if err != nil { panic(err) } var buf2 bytes.Buffer _, err = Fprint(&buf2, ast2, LineForm) if err != nil { panic(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 14 16:30:19 UTC 2024 - 12.2K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteSource.java
checkNotNull(other); byte[] buf1 = createBuffer(); byte[] buf2 = createBuffer(); Closer closer = Closer.create(); try { InputStream in1 = closer.register(openStream()); InputStream in2 = closer.register(other.openStream()); while (true) { int read1 = ByteStreams.read(in1, buf1, 0, buf1.length); int read2 = ByteStreams.read(in2, buf2, 0, buf2.length);
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 26.2K bytes - Viewed (0)