- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for discord (0.3 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) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Nov 06 22:26:08 GMT 2023 - 1.3K bytes - Viewed (0) -
internal/bpool/bpool.go
func (bp *BytePoolCap) Put(b []byte) { if bp == nil { return } select { case bp.c <- b: // buffer went back into pool default: // buffer didn't go back into pool, just discard } } // Width returns the width of the byte arrays in this pool. func (bp *BytePoolCap) Width() (n int) { if bp == nil { return 0 } return bp.w }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Apr 19 16:44:59 GMT 2024 - 2.6K 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) } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 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,
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Nov 07 02:19:41 GMT 2023 - 5.8K 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,
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 9.4K bytes - Viewed (0) -
cmd/metacache.go
if m == nil { return false } cache := m switch { case !cache.finished() && time.Since(cache.lastUpdate) > metacacheMaxRunningAge: // Not finished and update for metacacheMaxRunningAge, discard it. return false case cache.finished() && time.Since(cache.lastHandout) > 5*metacacheMaxClientWait: // Keep for 15 minutes after we last saw the client.
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 5K bytes - Viewed (0) -
internal/config/crypto_test.go
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 3.2K bytes - Viewed (0) -
cni/pkg/nodeagent/informers.go
// // If we get to this point and have a pod that really and truly has no IP in either of those, // it's not routable at this point and something is wrong/we should discard this event. podIPs := util.GetPodIPsIfPresent(pod) if len(podIPs) == 0 { log.Warnf("pod %s does not appear to have any assigned IPs, not capturing", pod.Name) return nil }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri May 03 19:29:42 GMT 2024 - 9.6K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
} } func TestCloseOnWriter(t *testing.T) { writer := WriteOnClose(io.Discard) if writer.HasWritten() { t.Error("WriteOnCloser must not be marked as HasWritten") } writer.Write(nil) if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten") } writer = WriteOnClose(io.Discard) writer.Close() if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten")
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Feb 02 11:02:31 GMT 2024 - 5.1K bytes - Viewed (0) -
src/archive/zip/fuzz_test.go
continue } } // If we were unable to read anything out of the archive don't // bother trying to roundtrip it. if len(files) == 0 { return } w := NewWriter(io.Discard) for _, f := range files { ww, err := w.CreateHeader(f.header) if err != nil { t.Fatalf("unable to write previously parsed header: %s", err) } if _, err := ww.Write(f.content); err != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jan 13 18:06:33 GMT 2022 - 1.7K bytes - Viewed (0)