- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for bufio (0.07 sec)
-
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) for _, i := range []int64{1, 2, 3, 4} {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 5.5K bytes - Viewed (0) -
internal/s3select/jstream/scanner_test.go
} }) b.Run("large", func(b *testing.B) { for i := 0; i < b.N; i++ { benchmarkBufioScanner(largeInput) } }) } func benchmarkBufioScanner(b []byte) { s := bufio.NewScanner(bytes.NewReader(b)) s.Split(bufio.ScanBytes) for s.Scan() { s.Bytes() } } func BenchmarkBufioReader(b *testing.B) { b.Run("small", func(b *testing.B) { for i := 0; i < b.N; i++ {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 3.2K bytes - Viewed (0) -
cmd/untar.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 cmd import ( "archive/tar" "bufio" "bytes" "context" "errors" "fmt" "io" "io/fs" "os" "path" "runtime" "sync" "time" "github.com/cosnicolaou/pbzip2" "github.com/klauspost/compress/s2"
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
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" "testing" ) // TestMain executes the test binary as the addr2line command if // GO_ADDR2LINETEST_IS_ADDR2LINE is set, and runs the tests otherwise.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 06 13:23:48 UTC 2024 - 3.2K bytes - Viewed (0) -
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 == "":
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Mar 06 11:43:16 UTC 2024 - 3.4K bytes - Viewed (0) -
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.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Jun 21 19:58:04 UTC 2024 - 2.4K bytes - Viewed (0) -
internal/http/response-recorder.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 http import ( "bufio" "bytes" "errors" "fmt" "io" "net" "net/http" "time" "github.com/klauspost/compress/gzip" ) // ResponseRecorder - is a wrapper to trap the http response
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
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
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0) -
internal/s3select/json/preader.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 json import ( "bufio" "bytes" "io" "runtime" "sync" "github.com/minio/minio/internal/s3select/jstream" "github.com/minio/minio/internal/s3select/sql" ) // PReader - JSON record reader for S3Select.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
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"
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Jun 21 19:58:04 UTC 2024 - 2.9K bytes - Viewed (0)