- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for io (0.15 sec)
-
src/bytes/reader.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package bytes import ( "errors" "io" "unicode/utf8" ) // A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker, // io.ByteScanner, and io.RuneScanner interfaces by reading from // a byte slice. // Unlike a [Buffer], a Reader is read-only and supports seeking.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
src/bytes/reader_test.go
{seek: io.SeekStart, off: -1, seekerr: "bytes.Reader.Seek: negative position"}, {seek: io.SeekStart, off: 1 << 33, wantpos: 1 << 33, readerr: io.EOF}, {seek: io.SeekCurrent, off: 1, wantpos: 1<<33 + 1, readerr: io.EOF}, {seek: io.SeekStart, n: 5, want: "01234"}, {seek: io.SeekCurrent, n: 5, want: "56789"}, {seek: io.SeekEnd, off: -1, n: 1, wantpos: 9, want: "9"}, } for i, tt := range tests {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0) -
src/archive/tar/writer.go
default: return n, nil } } func (sw *sparseFileWriter) ReadFrom(r io.Reader) (n int64, err error) { rs, ok := r.(io.ReadSeeker) if ok { if _, err := rs.Seek(0, io.SeekCurrent); err != nil { ok = false // Not all io.Seeker can really seek } } if !ok { return io.Copy(struct{ io.Writer }{sw}, r) } var readLastByte bool pos0 := sw.pos
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
src/archive/tar/example_test.go
} // Open and iterate through the files in the archive. tr := tar.NewReader(&buf) for { hdr, err := tr.Next() if err == io.EOF { break // End of archive } if err != nil { log.Fatal(err) } fmt.Printf("Contents of %s:\n", hdr.Name) if _, err := io.Copy(os.Stdout, tr); err != nil { log.Fatal(err) } fmt.Println() } // Output: // Contents of readme.txt:
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Nov 16 16:54:08 GMT 2017 - 1.4K bytes - Viewed (0) -
src/archive/zip/zip_test.go
} rc.(*checksumReader).hash = fakeHash32{} for i := 0; i < chunks; i++ { _, err := io.ReadFull(rc, chunk) if err != nil { t.Fatal("read:", err) } } if frag := int(size % chunkSize); frag > 0 { _, err := io.ReadFull(rc, chunk[:frag]) if err != nil { t.Fatal("read:", err) } } gotEnd, err := io.ReadAll(rc) if err != nil { t.Fatal("read end:", err) }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
// license that can be found in the LICENSE file. // Package asm implements the parser and instruction generator for the assembler. // TODO: Split apart? package asm import ( "fmt" "io" "log" "os" "strconv" "strings" "text/scanner" "unicode/utf8" "cmd/asm/internal/arch" "cmd/asm/internal/flags" "cmd/asm/internal/lex" "cmd/internal/obj" "cmd/internal/obj/arm64"
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/archive/zip/reader.go
} else { return &dirReader{io.EOF}, nil } } size := int64(f.CompressedSize64) r := io.NewSectionReader(f.zipr, f.headerOffset+bodyOffset, size) dcomp := f.zip.decompressor(f.Method) if dcomp == nil { return nil, ErrAlgorithm } var rc io.ReadCloser = dcomp(r) var desr io.Reader if f.hasDataDescriptor() {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
src/bufio/scan.go
// The split function defaults to [ScanLines]. func NewScanner(r io.Reader) *Scanner { return &Scanner{ r: r, split: ScanLines, maxTokenSize: MaxScanTokenSize, } } // Err returns the first non-EOF error that was encountered by the [Scanner]. func (s *Scanner) Err() error { if s.err == io.EOF { return nil } return s.err }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
misc/linkcheck/linkcheck.go
// It crawls a URL recursively and notes URLs and URL fragments // that it's seen and prints a report of missing links at the end. package main import ( "errors" "flag" "fmt" "io" "log" "net/http" "os" "regexp" "strings" "sync" ) var ( root = flag.String("root", "http://localhost:6060", "Root to crawl") verbose = flag.Bool("verbose", false, "verbose") )
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Oct 06 15:53:04 GMT 2021 - 3.9K bytes - Viewed (0) -
src/bufio/bufio_test.go
} } } func TestWriterReadFrom(t *testing.T) { ws := []func(io.Writer) io.Writer{ func(w io.Writer) io.Writer { return onlyWriter{w} }, func(w io.Writer) io.Writer { return w }, } rs := []func(io.Reader) io.Reader{ iotest.DataErrReader, func(r io.Reader) io.Reader { return r }, } for ri, rfunc := range rs { for wi, wfunc := range ws {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0)