- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for eof (0.17 sec)
-
src/bytes/reader_test.go
} if n, err := (&Reader{}).Read(nil); n != 0 || err != io.EOF { t.Errorf("Read: got %d, %v; want 0, io.EOF", n, err) } if n, err := (&Reader{}).ReadAt(nil, 11); n != 0 || err != io.EOF { t.Errorf("ReadAt: got %d, %v; want 0, io.EOF", n, err) } if b, err := (&Reader{}).ReadByte(); b != 0 || err != io.EOF { t.Errorf("ReadByte: got %d, %v; want 0, io.EOF", b, err) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0) -
src/bytes/reader.go
} if off >= int64(len(r.s)) { return 0, io.EOF } n = copy(b, r.s[off:]) if n < len(b) { err = io.EOF } return } // ReadByte implements the [io.ByteReader] interface. func (r *Reader) ReadByte() (byte, error) { r.prevRune = -1 if r.i >= int64(len(r.s)) { return 0, io.EOF } b := r.s[r.i] r.i++ return b, nil }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
src/cmd/asm/internal/asm/parse.go
value, err := strconv.ParseFloat(str, 64) if err != nil { p.errorf("%s", err) } return value } // EOF represents the end of input. var EOF = lex.Make(scanner.EOF, "EOF") func (p *Parser) next() lex.Token { if !p.more() { return EOF } tok := p.input[p.inputPos] p.inputPos++ return tok } func (p *Parser) back() { if p.inputPos == 0 {
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
name := in.Stack.Text() macro := in.macros[name] if macro != nil { nesting++ in.invokeMacro(macro) continue } fallthrough default: if tok == scanner.EOF && len(in.ifdefStack) > 0 { // We're skipping text but have run out of input with no #endif. in.Error("unclosed #ifdef or #ifndef") } in.beginningOfLine = tok == '\n' if in.enabled() {
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) -
src/archive/tar/example_test.go
} } if err := tw.Close(); err != nil { log.Fatal(err) } // 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()
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 16 16:54:08 GMT 2017 - 1.4K bytes - Viewed (0) -
src/archive/tar/writer.go
} } // If the last fragment is a hole, then seek to 1-byte before EOF, and // read a single byte to ensure the file is the right size. if readLastByte && err == nil { _, err = mustReadFull(rs, []byte{0}) sw.pos++ } n = sw.pos - pos0 switch { case err == io.EOF: return n, io.ErrUnexpectedEOF case err == ErrWriteTooLong:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
src/cmd/asm/internal/asm/expr_test.go
} tok := p.next() if test.atEOF && tok.ScanToken != scanner.EOF { t.Errorf("%d: %q: at EOF got %s", i, test.input, tok) } else if !test.atEOF && tok.ScanToken == scanner.EOF { t.Errorf("%d: %q: expected not EOF but at EOF", i, test.input) } } } type badExprTest struct { input string error string // Empty means no error. }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 3.2K bytes - Viewed (0) -
src/cmd/asm/internal/lex/lex.go
func IsRegisterShift(r ScanToken) bool { return ROT <= r && r <= LSH // Order looks backwards because these are negative. } func (t ScanToken) String() string { switch t { case scanner.EOF: return "EOF" case scanner.Ident: return "identifier" case scanner.Int: return "integer constant" case scanner.Float: return "float constant" case scanner.Char: return "rune constant"
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 18:31:05 GMT 2023 - 4.1K bytes - Viewed (0) -
src/bufio/scan.go
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 } // Bytes returns the most recent token generated by a call to [Scanner.Scan].
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
src/cmd/asm/internal/lex/lex_test.go
} // drain returns a single string representing the processed input tokens. func drain(input *Input) string { 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 {
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)