- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,058 for readArg (0.13 sec)
-
src/net/textproto/reader_test.go
package textproto import ( "bufio" "bytes" "io" "net" "reflect" "runtime" "strings" "sync" "testing" ) func reader(s string) *Reader { return NewReader(bufio.NewReader(strings.NewReader(s))) } func TestReadLine(t *testing.T) { r := reader("line1\nline2\n") s, err := r.ReadLine() if s != "line1" || err != nil { t.Fatalf("Line 1: %s, %v", s, err) } s, err = r.ReadLine()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 05 18:31:56 UTC 2024 - 14.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go
} // getResponseCode reads a http response from the given reader, returns the response, // the bytes read from the reader, and any error encountered func getResponse(r io.Reader) (*http.Response, []byte, error) { rawResponse := bytes.NewBuffer(make([]byte, 0, 256)) // Save the bytes read while reading the response headers into the rawResponse buffer
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 04 19:10:30 UTC 2024 - 19.6K bytes - Viewed (0) -
src/bufio/bufio.go
// NewReaderSize returns a new [Reader] whose buffer has at least the specified // size. If the argument io.Reader is already a [Reader] with large enough // size, it returns the underlying [Reader]. func NewReaderSize(rd io.Reader, size int) *Reader { // Is it already a Reader? b, ok := rd.(*Reader) if ok && len(b.buf) >= size { return b } r := new(Reader) r.reset(make([]byte, max(size, minReadBufferSize)), rd)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
pkg/file/file.go
// limitations under the License. package file import ( "bytes" "errors" "fmt" "io" "io/fs" "os" "path/filepath" ) // AtomicCopy copies file by reading the file then writing atomically into the target directory func AtomicCopy(srcFilepath, targetDir, targetFilename string) error { in, err := os.Open(srcFilepath) if err != nil { return err } defer in.Close()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 21:42:29 UTC 2024 - 3K bytes - Viewed (0) -
src/go/parser/interface.go
// otherwise it returns an error. If src == nil, readSource returns // the result of reading the file specified by filename. func readSource(filename string, src any) ([]byte, error) { if src != nil { switch s := src.(type) { case string: return []byte(s), nil case []byte: return s, nil case *bytes.Buffer: // is io.Reader, but src is already available in []byte form if s != nil { return s.Bytes(), nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 7.5K bytes - Viewed (0) -
pkg/config/analysis/local/istiod_analyze.go
ResourceName string } // ReaderSource is a tuple of a io.Reader and filepath. type ReaderSource struct { // Name is the name of the source (commonly the path to a file, but can be "-" for sources read from stdin or "" if completely synthetic). Name string // Reader is the reader instance to use. Reader io.Reader
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Apr 02 21:06:13 UTC 2024 - 21.6K bytes - Viewed (0) -
src/internal/trace/generation.go
if err != nil { return fmt.Errorf("reading frame %d's PC for stack %d: %w", i+1, id, err) } funcID, err := binary.ReadUvarint(r) if err != nil { return fmt.Errorf("reading frame %d's funcID for stack %d: %w", i+1, id, err) } fileID, err := binary.ReadUvarint(r) if err != nil { return fmt.Errorf("reading frame %d's fileID for stack %d: %w", i+1, id, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 22:14:45 UTC 2024 - 12.1K bytes - Viewed (0) -
src/internal/zstd/fse.go
} return nil } // fseBaselineEntry is an entry in an FSE baseline table. // We use these for literal/match/length values. // Those require mapping the symbol to a baseline value, // and then reading zero or more bits and adding the value to the baseline. // Rather than looking these up in separate tables, // we convert the FSE table to an FSE baseline table. type fseBaselineEntry struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 16:44:06 UTC 2023 - 12.2K bytes - Viewed (0) -
cmd/erasure-object.go
readers[index] = newBitrotReader(disk, metaArr[index].Data, bucket, partPath, tillOffset, checksumInfo.Algorithm, checksumInfo.Hash, erasure.ShardSize()) // Prefer local disks prefer[index] = disk.Hostname() == "" } written, err := erasure.Decode(ctx, writer, readers, partOffset, partLength, partSize, prefer)
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 78.6K bytes - Viewed (0) -
src/runtime/profbuf.go
// reader. If the writer is called to write a new record and finds that // the output buffer has room for both the pending overflow entry and the // new record, the writer emits the pending overflow entry and the new // record into the buffer. If the reader is called to read data and finds // that the output buffer is empty but that there is a pending overflow // entry, the reader will return a synthesized record for the pending
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 18.2K bytes - Viewed (0)