Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for bufio (0.15 sec)

  1. 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)
  2. cmd/streaming-signature-v4_test.go

    	}
    	testCases := []testCase{
    		// Test - 1 - small bufio reader.
    		{
    			bufio.NewReaderSize(readers[0], 16),
    			errLineTooLong,
    			nil,
    			nil,
    		},
    		// Test - 2 - unexpected end of the reader.
    		{
    			bufio.NewReader(readers[1]),
    			io.ErrUnexpectedEOF,
    			nil,
    			nil,
    		},
    		// Test - 3 - line too long bigger than 4k+1
    		{
    			bufio.NewReader(readers[2]),
    			errLineTooLong,
    			nil,
    			nil,
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 5.7K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/addr2line/main.go

    	if err != nil {
    		log.Fatal(err)
    	}
    	defer f.Close()
    
    	tab, err := f.PCLineTable()
    	if err != nil {
    		log.Fatalf("reading %s: %v", flag.Arg(0), err)
    	}
    
    	stdin := bufio.NewScanner(os.Stdin)
    	stdout := bufio.NewWriter(os.Stdout)
    
    	for stdin.Scan() {
    		p := stdin.Text()
    		if strings.Contains(p, ":") {
    			// Reverse translate file:line to pc.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  7. src/bufio/export_test.go

    // Copyright 2013 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
    
    // Exported for testing only.
    import (
    	"unicode/utf8"
    )
    
    var IsSpace = isSpace
    
    const DefaultBufSize = defaultBufSize
    
    func (s *Scanner) MaxTokenSize(n int) {
    	if n < utf8.UTFMax || n > 1e9 {
    		panic("bad max token size")
    	}
    	if n < len(s.buf) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 17:17:44 GMT 2017
    - 597 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. 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)
  10. src/cmd/addr2line/addr2line_test.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"
    	"bytes"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"runtime"
    	"strings"
    	"sync"
    	"testing"
    )
    
    // TestMain executes the test binary as the addr2line command if
    // GO_ADDR2LINETEST_IS_ADDR2LINE is set, and runs the tests otherwise.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Feb 21 22:16:54 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top