- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 163 for readVal (0.12 sec)
-
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/streamer_test.go
} readCloser, _, _, err := streamer.InputStream(context.Background(), "", "") if err != nil { t.Errorf("Unexpected error when getting stream: %v", err) return } defer readCloser.Close() result, _ := ioutil.ReadAll(readCloser) if string(result) != resultString { t.Errorf("Stream content does not match. Got: %s. Expected: %s.", string(result), resultString) } } func TestInputStreamNullLocation(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Feb 27 08:25:24 UTC 2021 - 5K bytes - Viewed (0) -
cmd/storage-rest-common_gen.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 7.9K bytes - Viewed (0) -
pilot/pkg/request/command.go
req, err := http.NewRequest(method, url, bodyBuffer) if err != nil { return err } resp, err := c.Client.Do(req) if err != nil { return err } defer resp.Body.Close() respBody, err := io.ReadAll(resp.Body) if err != nil { return err } if resp.StatusCode > 399 && resp.StatusCode != 404 { return fmt.Errorf("received unsuccessful status code %v: %v", resp.StatusCode, string(respBody)) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Nov 02 03:58:02 UTC 2021 - 1.5K bytes - Viewed (0) -
cmd/bitrot-streaming.go
} return nil } func (b *streamingBitrotReader) ReadAt(buf []byte, offset int64) (int, error) { var err error if offset%b.shardSize != 0 { // Offset should always be aligned to b.shardSize // Can never happen unless there are programmer bugs return 0, errUnexpected } if b.rc == nil { // For the first ReadAt() call we need to open the stream for reading. b.currOffset = offset
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 6.1K bytes - Viewed (0) -
src/net/writev_test.go
buffers := Buffers{ []byte("once "), []byte("upon "), []byte("a "), []byte("time "), []byte("in "), []byte("Gopherland ... "), } got, err := io.ReadAll(&buffers) if err != nil { t.Fatal(err) } if string(got) != story { t.Errorf("read %q; want %q", got, story) } if len(buffers) != 0 { t.Errorf("len(buffers) = %d; want 0", len(buffers)) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 5K bytes - Viewed (0) -
internal/config/crypto.go
// ciphertext. func EncryptBytes(k *kms.KMS, plaintext []byte, context kms.Context) ([]byte, error) { ciphertext, err := Encrypt(k, bytes.NewReader(plaintext), context) if err != nil { return nil, err } return io.ReadAll(ciphertext) } // DecryptBytes decrypts the ciphertext using a key managed by the KMS. // The same context that have been used during encryption must be // provided.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Tue May 07 23:55:37 UTC 2024 - 5K bytes - Viewed (0) -
src/net/mail/example_test.go
} header := m.Header fmt.Println("Date:", header.Get("Date")) fmt.Println("From:", header.Get("From")) fmt.Println("To:", header.Get("To")) fmt.Println("Subject:", header.Get("Subject")) body, err := io.ReadAll(m.Body) if err != nil { log.Fatal(err) } fmt.Printf("%s", body) // Output: // Date: Mon, 23 Jun 2015 11:40:36 -0400 // From: Gopher <******@****.***> // To: Another Gopher <******@****.***>
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
.build() client.newCall(request).execute().use { response -> if (!response.isSuccessful) throw IOException("Unexpected code $response") fileSystem.sink(path).use { response.body.source().readAll(it) } println(fileSystem.source(path).buffer().readUtf8()) } } companion object { val MEDIA_TYPE_JSON = "application/json".toMediaType() } } fun main() {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
pkg/util/tail/tail.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu May 30 13:13:22 UTC 2024 - 1.3K bytes - Viewed (0) -
src/internal/saferio/io.go
// n is too large to fit in int, so we can't allocate // a buffer large enough. Treat this as a read failure. return nil, io.ErrUnexpectedEOF } if n < chunk { buf := make([]byte, n) _, err := r.ReadAt(buf, off) if err != nil { // io.SectionReader can return EOF for n == 0, // but for our purposes that is a success. if err != io.EOF || n > 0 { return nil, err } } return buf, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 31 00:34:05 UTC 2023 - 3.4K bytes - Viewed (0)