Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 39 for bufio (0.17 sec)

  1. src/bufio/bufio.go

    )
    
    var (
    	ErrInvalidUnreadByte = errors.New("bufio: invalid use of UnreadByte")
    	ErrInvalidUnreadRune = errors.New("bufio: invalid use of UnreadRune")
    	ErrBufferFull        = errors.New("bufio: buffer full")
    	ErrNegativeCount     = errors.New("bufio: negative count")
    )
    
    // Buffered input.
    
    // Reader implements buffering for an io.Reader object.
    type Reader struct {
    	buf          []byte
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package bufio_test
    
    import (
    	. "bufio"
    	"bytes"
    	"errors"
    	"fmt"
    	"io"
    	"math/rand"
    	"strconv"
    	"strings"
    	"testing"
    	"testing/iotest"
    	"time"
    	"unicode/utf8"
    )
    
    // Reads from a reader and rot13s the result.
    type rot13Reader struct {
    	r io.Reader
    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)
  3. src/bufio/example_test.go

    package bufio_test
    
    import (
    	"bufio"
    	"bytes"
    	"fmt"
    	"os"
    	"strconv"
    	"strings"
    )
    
    func ExampleWriter() {
    	w := bufio.NewWriter(os.Stdout)
    	fmt.Fprint(w, "Hello, ")
    	fmt.Fprint(w, "world!")
    	w.Flush() // Don't forget to flush!
    	// Output: Hello, world!
    }
    
    func ExampleWriter_AvailableBuffer() {
    	w := bufio.NewWriter(os.Stdout)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  4. cmd/streaming-v4-unsigned.go

    		req.Trailer = nil
    	}
    	return &s3UnsignedChunkedReader{
    		trailers: req.Trailer,
    		reader:   bufio.NewReader(req.Body),
    		buffer:   make([]byte, 64*1024),
    	}, ErrNone
    }
    
    // Represents the overall state that is required for decoding a
    // AWS Signature V4 chunked reader.
    type s3UnsignedChunkedReader struct {
    	reader   *bufio.Reader
    	trailers http.Header
    
    	buffer []byte
    	offset int
    	err    error
    	debug  bool
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat May 06 02:53:12 GMT 2023
    - 6.1K bytes
    - Viewed (1)
  5. docs/debugging/pprofgoparser/main.go

    	}
    
    	bf := bytes.Buffer{}
    
    	save := func(s string) {
    		bf.WriteString(s + "\n")
    	}
    	reset := func() {
    		bf.Reset()
    	}
    
    	ret := make(map[time.Duration][]string)
    
    	s := bufio.NewScanner(f)
    	s.Split(bufio.ScanLines)
    
    	var (
    		t            time.Duration
    		skip, record bool
    	)
    
    	for s.Scan() {
    		line := s.Text()
    		switch {
    		case skip && line != "":
    		case skip && line == "":
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  6. internal/s3select/json/preader.go

    package json
    
    import (
    	"bufio"
    	"bytes"
    	"io"
    	"runtime"
    	"sync"
    
    	"github.com/bcicen/jstream"
    	"github.com/minio/minio/internal/s3select/sql"
    )
    
    // PReader - JSON record reader for S3Select.
    // Operates concurrently on line-delimited JSON.
    type PReader struct {
    	args        *ReaderArgs
    	readCloser  io.ReadCloser   // raw input
    	buf         *bufio.Reader   // input to the splitter
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 6.4K bytes
    - Viewed (0)
  7. src/bufio/scan.go

    // Errors returned by Scanner.
    var (
    	ErrTooLong         = errors.New("bufio.Scanner: token too long")
    	ErrNegativeAdvance = errors.New("bufio.Scanner: SplitFunc returns negative advance count")
    	ErrAdvanceTooFar   = errors.New("bufio.Scanner: SplitFunc returns advance count beyond input")
    	ErrBadReadCount    = errors.New("bufio.Scanner: Read returned impossible count")
    )
    
    const (
    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)
  8. src/cmd/asm/main.go

    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"bufio"
    	"flag"
    	"fmt"
    	"internal/buildcfg"
    	"log"
    	"os"
    
    	"cmd/asm/internal/arch"
    	"cmd/asm/internal/asm"
    	"cmd/asm/internal/flags"
    	"cmd/asm/internal/lex"
    
    	"cmd/internal/bio"
    	"cmd/internal/obj"
    	"cmd/internal/objabi"
    )
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  9. cmd/streaming-signature-v4.go

    // The returned bytes are owned by the bufio.Reader
    // so they are only valid until the next bufio read.
    func readChunkLine(b *bufio.Reader) ([]byte, []byte, error) {
    	buf, err := b.ReadSlice('\n')
    	if err != nil {
    		// We always know when EOF is coming.
    		// If the caller asked for a line, there should be a line.
    		if err == io.EOF {
    			err = io.ErrUnexpectedEOF
    		} else if err == bufio.ErrBufferFull {
    			err = errLineTooLong
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  10. internal/deadlineconn/deadlineconn_test.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package deadlineconn
    
    import (
    	"bufio"
    	"io"
    	"net"
    	"sync"
    	"testing"
    	"time"
    )
    
    // Test deadlineconn handles read timeout properly by reading two messages beyond deadline.
    func TestBuffConnReadTimeout(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Nov 05 18:09:21 GMT 2022
    - 3K bytes
    - Viewed (0)
Back to top