- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for Peek (0.15 sec)
-
src/bufio/bufio_test.go
} if _, err := buf.Peek(1); err != io.EOF { t.Fatalf("want EOF got %v", err) } // Test for issue 3022, not exposing a reader's error on a successful Peek. buf = NewReaderSize(dataAndEOFReader("abcd"), 32) if s, err := buf.Peek(2); string(s) != "ab" || err != nil { t.Errorf(`Peek(2) on "abcd", EOF = %q, %v; want "ab", nil`, string(s), err) } if s, err := buf.Peek(4); string(s) != "abcd" || err != nil {
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/cmd/asm/internal/lex/tokenizer.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Aug 04 20:35:21 GMT 2022 - 3K bytes - Viewed (0) -
src/bufio/bufio.go
err := b.err b.err = nil return err } // Peek returns the next n bytes without advancing the reader. The bytes stop // being valid at the next read call. If Peek returns fewer than n bytes, it // also returns an error explaining why the read is short. The error is // [ErrBufferFull] if n is larger than b's buffer size. // // Calling Peek prevents a [Reader.UnreadByte] or [Reader.UnreadRune] call from succeeding
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) -
cmd/metacache-stream.go
if r.creator == nil || r.err != nil { return } r.err = r.creator() r.creator = nil } // peek will return the name of the next object. // Will return io.EOF if there are no more objects. // Should be used sparingly. func (r *metacacheReader) peek() (metaCacheEntry, error) { r.checkInit() if r.err != nil { return metaCacheEntry{}, r.err } if r.current.name != "" {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 19.5K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
doIssueError := true isStatic, abi := p.symRefAttrs(name, doIssueError) if p.peek() == '+' || p.peek() == '-' { a.Offset = int64(p.expr()) } if isStatic { a.Sym = p.ctxt.LookupStatic(name) } else { a.Sym = p.ctxt.LookupABI(name, abi) } if p.peek() == scanner.EOF { if prefix == 0 && p.isJump { // Symbols without prefix or suffix are jump labels. return }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Feb 21 14:34:57 GMT 2024 - 36.9K bytes - Viewed (0) -
src/cmd/asm/internal/lex/input.go
} func (in *Input) expectNewline(directive string) { tok := in.Stack.Next() if tok != '\n' { in.expectText("expected newline after", directive) } } func (in *Input) Next() ScanToken { if in.peek { in.peek = false tok := in.peekToken in.text = in.peekText return tok } // If we cannot generate a token after 100 macro invocations, we're in trouble. // The usual case is caught by Push, below, but be safe.
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 12.6K bytes - Viewed (0) -
cmd/s3-zip-handlers.go
archiveTypeMetadataKey = ReservedMetadataPrefixLower + "archive-type" // "x-minio-internal-archive-type" archiveInfoMetadataKey = ReservedMetadataPrefixLower + "archive-info" // "x-minio-internal-archive-info" // Peek into a zip archive xMinIOExtract = "x-minio-extract" ) // splitZipExtensionPath splits the S3 path to the zip file and the path inside the zip: //
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Apr 09 10:41:25 GMT 2024 - 15.8K bytes - Viewed (0) -
cmd/metacache-stream_test.go
} if gotObj.name != want { t.Errorf("entry %d, want %q, got %q", i, want, gotObj.name) } } } func Test_metacacheReader_peek(t *testing.T) { r := loadMetacacheSample(t) defer r.Close() for i, want := range loadMetacacheSampleNames { got, err := r.peek() if err == io.EOF { break } if err != nil { t.Fatal(err) } if got.name != want {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 15K bytes - Viewed (0) -
cmd/metacache-set.go
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Fri Apr 26 19:52:52 GMT 2024 - 30.4K bytes - Viewed (0) -
cmd/untar.go
"github.com/pierrec/lz4" ) // Max bzip2 concurrency across calls. 50% of GOMAXPROCS. var bz2Limiter = pbzip2.CreateConcurrencyPool((runtime.GOMAXPROCS(0) + 1) / 2) func detect(r *bufio.Reader) format { z, err := r.Peek(4) if err != nil { return formatUnknown } for _, f := range magicHeaders { if bytes.Equal(f.header, z[:len(f.header)]) { return f.f } } return formatUnknown }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 6K bytes - Viewed (0)