- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for newReader (0.09 sec)
-
src/bufio/bufio_test.go
} } return string(b[0:nb]) } func TestReaderSimple(t *testing.T) { data := "hello world" b := NewReader(strings.NewReader(data)) if s := readBytes(b); s != "hello world" { t.Errorf("simple hello world test failed: got %q", s) } b = NewReader(newRot13Reader(strings.NewReader(data))) if s := readBytes(b); s != "uryyb jbeyq" { t.Errorf("rot13 hello world test failed: got %q", s) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/bufio/example_test.go
func ExampleWriter_ReadFrom() { var buf bytes.Buffer writer := bufio.NewWriter(&buf) data := "Hello, world!\nThis is a ReadFrom example." reader := strings.NewReader(data) n, err := writer.ReadFrom(reader) if err != nil { fmt.Println("ReadFrom Error:", err) return } if err = writer.Flush(); err != nil { fmt.Println("Flush Error:", err) return }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 5.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSinkTest.java
assertThrows(IOException.class, () -> failSource.copyTo(okSink)); // ensure writer was closed IF it was opened (depends on implementation whether or not it's // opened at all if source.newReader() throws). assertTrue( "stream not closed when copying from source with option: " + option, !okSink.wasStreamOpened() || okSink.wasStreamClosed()); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 4.5K bytes - Viewed (0) -
cmd/warm-backend.go
// to perform all operations defined in the WarmBackend interface. func checkWarmBackend(ctx context.Context, w WarmBackend) error { remoteVersionID, err := w.Put(ctx, probeObject, strings.NewReader("MinIO"), 5) if err != nil { if _, ok := err.(BackendDown); ok { return err } return tierPermErr{ Op: tierPut, Err: err, } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 4K bytes - Viewed (0) -
cmd/erasure-healing-common.go
} // Always check data, if we got it. if (len(meta.Data) > 0 || meta.Size == 0) && len(meta.Parts) > 0 { checksumInfo := meta.Erasure.GetChecksumInfo(meta.Parts[0].Number) verifyErr := bitrotVerify(bytes.NewReader(meta.Data), int64(len(meta.Data)), meta.Erasure.ShardFileSize(meta.Size), checksumInfo.Algorithm, checksumInfo.Hash, meta.Erasure.ShardSize()) dataErrsByPart[0][i] = convPartErrToInt(verifyErr)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 12.7K bytes - Viewed (0) -
cmd/iam.go
if ptok && spok && pt == embeddedPolicyType { policyBytes, err := base64.StdEncoding.DecodeString(sp) if err != nil { return UserIdentity{}, nil, err } embeddedPolicy, err = policy.ParseConfig(bytes.NewReader(policyBytes)) if err != nil { return UserIdentity{}, nil, err } } return sa, embeddedPolicy, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
doc/godebug.md
### Go 1.20 Go 1.20 introduced support for rejecting insecure paths in tar and zip archives, controlled by the [`tarinsecurepath` setting](/pkg/archive/tar/#Reader.Next) and the [`zipinsecurepath` setting](/pkg/archive/zip/#NewReader). These default to `tarinsecurepath=1` and `zipinsecurepath=1`, preserving the behavior of earlier versions of Go. A future version of Go may change the defaults to `tarinsecurepath=0` and `zipinsecurepath=0`.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 28 14:46:33 UTC 2024 - 17.2K bytes - Viewed (0) -
cmd/erasure-object.go
return &GetObjectReader{ ObjInfo: objInfo, }, err } // Zero byte objects don't even need to further initialize pipes etc. return NewGetObjectReaderFromReader(bytes.NewReader(nil), objInfo, opts) } if objInfo.IsRemote() { gr, err := getTransitionedObjectReader(ctx, bucket, object, rs, h, objInfo, opts) if err != nil { return nil, err } unlockOnDefer = false
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
cmd/xl-storage.go
// fdatasync() at the end instead of opening the file with O_DSYNC. // // This is an optimization mainly to ensure faster I/O. if len(b) > xioutil.DirectioAlignSize { r := bytes.NewReader(b) return s.writeAllDirect(ctx, filePath, r.Size(), r, flags, skipParent, true) } w, err = s.openFileSync(filePath, flags, skipParent) } else { w, err = s.openFile(filePath, flags, skipParent) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0)