- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for write_bytes (0.17 sec)
-
src/bytes/buffer_test.go
n, err := buf.Write(testBytes[0:1]) if want := 1; err != nil || n != want { t.Errorf("Write: got (%d, %v), want (%d, %v)", n, err, want, nil) } check(t, "TestBasicOperations (4)", &buf, "a") buf.WriteByte(testString[1]) check(t, "TestBasicOperations (5)", &buf, "ab") n, err = buf.Write(testBytes[2:26]) if want := 24; err != nil || n != want { t.Errorf("Write: got (%d, %v), want (%d, %v)", n, err, want, nil)
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) -
src/bufio/bufio_test.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/bytes/buffer.go
} // Buffer is now empty; reset. b.Reset() return n, nil } // WriteByte appends the byte c to the buffer, growing the buffer as needed. // The returned error is always nil, but is included to match [bufio.Writer]'s // WriteByte. If the buffer becomes too large, WriteByte will panic with // [ErrTooLarge]. func (b *Buffer) WriteByte(c byte) error { b.lastRead = opInvalid m, ok := b.tryGrowByReslice(1) if !ok {
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) -
api/go1.14.txt
pkg hash/maphash, method (*Hash) Sum([]uint8) []uint8 pkg hash/maphash, method (*Hash) Sum64() uint64 pkg hash/maphash, method (*Hash) Write([]uint8) (int, error) pkg hash/maphash, method (*Hash) WriteByte(uint8) error pkg hash/maphash, method (*Hash) WriteString(string) (int, error) pkg hash/maphash, type Hash struct pkg hash/maphash, type Seed struct pkg log, const Lmsgprefix = 64 pkg log, const Lmsgprefix ideal-int
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Feb 17 20:31:46 GMT 2023 - 508.9K bytes - Viewed (0) -
src/cmd/api/main_test.go
buf.WriteString(pkg.Name()) buf.WriteByte('.') } buf.WriteString(typ.Obj().Name()) if targs := typ.TypeArgs(); targs.Len() > 0 { buf.WriteByte('[') for i := 0; i < targs.Len(); i++ { if i > 0 { buf.WriteString(", ") } w.writeType(buf, targs.At(i)) } buf.WriteByte(']') } case *types.TypeParam:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Apr 09 20:48:51 GMT 2024 - 31.4K bytes - Viewed (0) -
src/bufio/scan_test.go
} for i := 0; i < n-1; i++ { // Stop early for \n. c := 'a' + byte(lineNum+i) if c == '\n' || c == '\r' { // Don't confuse us. c = 'N' } buf.WriteByte(c) } if addNewline { if doCR { buf.WriteByte('\r') } buf.WriteByte('\n') } } // Test the line splitter, including some carriage returns but no long lines. func TestScanLongLines(t *testing.T) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Sep 22 16:22:42 GMT 2023 - 14.3K bytes - Viewed (0) -
src/bufio/bufio.go
} nn += n p = p[n:] } if b.err != nil { return nn, b.err } n := copy(b.buf[b.n:], p) b.n += n nn += n return nn, nil } // WriteByte writes a single byte. func (b *Writer) WriteByte(c byte) error { if b.err != nil { return b.err } if b.Available() <= 0 && b.Flush() != nil { return b.err } b.buf[b.n] = c b.n++ return nil }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Oct 12 14:39:08 GMT 2023 - 21.8K bytes - Viewed (0) -
src/cmd/asm/internal/lex/lex_test.go
var buf strings.Builder for { tok := input.Next() if tok == scanner.EOF { return buf.String() } if tok == '#' { continue } if buf.Len() > 0 { buf.WriteByte('.') } buf.WriteString(input.Text()) } } type badLexTest struct { input string error string } var badLexTests = []badLexTest{ { "3 #define foo bar\n",
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 5.8K bytes - Viewed (0)