- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for read_bytes (2.98 sec)
-
src/cmd/go/internal/modindex/build_read.go
func (r *importReader) syntaxError() { if r.err == nil { r.err = errSyntax } } // readByte reads the next byte from the input, saves it in buf, and returns it. // If an error occurs, readByte records the error in r.err and returns 0. func (r *importReader) readByte() byte { c, err := r.b.ReadByte() if err == nil { r.buf = append(r.buf, c) if c == 0 { err = errNUL } } if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 10:10:21 UTC 2023 - 13K bytes - Viewed (0) -
src/bytes/buffer_test.go
} // after successful read if _, err := b.ReadBytes('m'); err != nil { t.Fatalf("ReadBytes: %v", err) } if err := b.UnreadByte(); err != nil { t.Fatalf("UnreadByte: %v", err) } c, err := b.ReadByte() if err != nil { t.Fatalf("ReadByte: %v", err) } if c != 'm' { t.Errorf("ReadByte = %q; want %q", c, 'm') } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:31:36 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bufio/bufio_test.go
} // Test error after ReadByte. _, _, err = r.ReadRune() // reset state if err != nil { t.Error("unexpected error on ReadRune (2):", err) } for range buf { _, err = r.ReadByte() if err != nil { t.Error("unexpected error on ReadByte (2):", err) } } if r.UnreadRune() == nil { t.Error("expected error after ReadByte") } // Test error after UnreadByte.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 10 18:56:01 UTC 2023 - 51.5K bytes - Viewed (0) -
src/bufio/bufio.go
totalLen += len(frag) return fullBuffers, frag, totalLen, err } // ReadBytes reads until the first occurrence of delim in the input, // returning a slice containing the data up to and including the delimiter. // If ReadBytes encounters an error before finding a delimiter, // it returns the data read before the error and the error itself (often io.EOF). // ReadBytes returns err != nil if and only if the returned data does not end in // delim.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/cmd/compile/internal/test/reproduciblebuilds_test.go
if err != nil { t.Fatalf("%v: %v:\n%s", cmd.Args, err, out) } } readBytes := func(fn string) []byte { payload, err := os.ReadFile(fn) if err != nil { t.Fatalf("failed to read executable '%s': %v", fn, err) } return payload } b1 := readBytes(scenarios[0].libpath) b2 := readBytes(scenarios[1].libpath) if !bytes.Equal(b1, b2) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 06 18:07:35 UTC 2023 - 2.8K bytes - Viewed (0) -
src/cmd/compile/internal/test/inl_test.go
"MulUintptr", }, "bytes": { "(*Buffer).Bytes", "(*Buffer).Cap", "(*Buffer).Len", "(*Buffer).Grow", "(*Buffer).Next", "(*Buffer).Read", "(*Buffer).ReadByte", "(*Buffer).Reset", "(*Buffer).String", "(*Buffer).UnreadByte", "(*Buffer).tryGrowByReslice", }, "internal/abi": { "UseInterfaceSwitchCache", }, "compress/flate": {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 09 04:07:57 UTC 2024 - 10.7K bytes - Viewed (0) -
src/cmd/go/internal/imports/read.go
func (r *importReader) syntaxError() { if r.err == nil { r.err = errSyntax } } // readByte reads the next byte from the input, saves it in buf, and returns it. // If an error occurs, readByte records the error in r.err and returns 0. func (r *importReader) readByte() byte { c, err := r.b.ReadByte() if err == nil { r.buf = append(r.buf, c) if c == 0 { err = errNUL } } if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 15 18:42:11 UTC 2021 - 6.1K bytes - Viewed (0) -
src/cmd/compile/internal/amd64/versions_test.go
f, err := os.Open(src) if err != nil { t.Fatal(err) } r := bufio.NewReader(f) w := bufio.NewWriter(dst) a := uint64(0) done := 0 for { b, err := r.ReadByte() if err == io.EOF { break } if err != nil { t.Fatal("can't read") } if physicalEdits[a] { b = 0xcc // INT3 opcode done++ } err = w.WriteByte(b)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:19:15 UTC 2022 - 10.9K bytes - Viewed (0)