- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 139 for discard (0.12 sec)
-
internal/ioutil/discard.go
import ( "io" ) // Discard is just like io.Discard without the io.ReaderFrom compatible // implementation which is buggy on NUMA systems, we have to use a simpler // io.Writer implementation alone avoids also unnecessary buffer copies, // and as such incurred latencies. var Discard io.Writer = discard{} // discard is /dev/null for Golang. type discard struct{} func (discard) Write(p []byte) (int, error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Nov 06 22:26:08 UTC 2023 - 1.3K bytes - Viewed (0) -
src/bufio/bufio_test.go
continue } } discarded, err := br.Discard(tt.n) if ge, we := fmt.Sprint(err), fmt.Sprint(tt.wantErr); discarded != tt.want || ge != we { t.Errorf("%s: Discard(%d) = (%v, %v); want (%v, %v)", tt.name, tt.n, discarded, ge, tt.want, we) continue } if bn := br.Buffered(); bn != tt.wantBuffered { t.Errorf("%s: after Discard, Buffered = %d; want %d", tt.name, bn, tt.wantBuffered) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
import okhttp3.Interceptor import okhttp3.Protocol import okhttp3.Request import okhttp3.Response import okhttp3.internal.closeQuietly import okhttp3.internal.connection.RealCall import okhttp3.internal.discard import okhttp3.internal.http.ExchangeCodec import okhttp3.internal.http.HttpMethod import okhttp3.internal.http.RealResponseBody import okhttp3.internal.http.promisesBody import okhttp3.internal.stripBody
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
src/bytes/reader_test.go
n int64 err error } type justReader struct { io.Reader } type justWriter struct { io.Writer } discard := justWriter{io.Discard} // hide ReadFrom var with, withOut nErr with.n, with.err = io.Copy(discard, NewReader(nil)) withOut.n, withOut.err = io.Copy(discard, justReader{NewReader(nil)}) if with != withOut { t.Errorf("behavior differs: with = %#v; without: %#v", with, withOut) } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 8K bytes - Viewed (0) -
logger/logger.go
Error(context.Context, string, ...interface{}) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) } var ( // Discard logger will print any log to io.Discard Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{}) // Default Default logger Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{ SlowThreshold: 200 * time.Millisecond,
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Nov 07 02:19:41 UTC 2023 - 5.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
import okhttp3.HttpUrl import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import okhttp3.internal.EMPTY_HEADERS import okhttp3.internal.checkOffsetAndCount import okhttp3.internal.discard import okhttp3.internal.headersContentLength import okhttp3.internal.http.ExchangeCodec import okhttp3.internal.http.HTTP_CONTINUE import okhttp3.internal.http.RequestLine import okhttp3.internal.http.StatusLine
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.2K bytes - Viewed (0) -
cmd/storage-datatypes_test.go
MountPath: "/tmp/drive1", ID: "uuid", Error: "", } b.SetBytes(1) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { err := msgp.Encode(io.Discard, &v) if err != nil { b.Fatal(err) } } } func BenchmarkEncodeDiskInfoGOB(b *testing.B) { v := DiskInfo{ Total: 1000, Free: 1000, Used: 1000,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 9.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt
val request = Request(server.url("/")) val response1 = client.newCall(request).execute() val response2 = client.newCall(request).execute() response1.body.string() // Discard the response body. response2.body.string() // Discard the response body. assertThat(server.takeRequest().sequenceNumber).isEqualTo(0) assertThat(server.takeRequest().sequenceNumber).isEqualTo(1) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java
try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
val cookie = cookies[0] assertThat(cookie.name).isEqualTo("a") assertThat(cookie.value).isEqualTo("android") assertThat(cookie.comment).isNull() assertThat(cookie.commentURL).isNull() assertThat(cookie.discard).isFalse() assertThat(cookie.maxAge).isGreaterThan(100000000000L) assertThat(cookie.path).isEqualTo("/path") assertThat(cookie.secure).isTrue() assertThat(cookie.version).isEqualTo(0) } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0)