- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 136 for errc2 (0.04 sec)
-
src/net/tcpsock_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 20 06:04:31 UTC 2024 - 17.7K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/err2.go
Austin Clements <******@****.***> 1683216807 -0400
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 2.5K bytes - Viewed (0) -
src/net/smtp/smtp_test.go
} defer l.Close() errCh := make(chan error) go func() { defer close(errCh) conn, err := l.Accept() if err != nil { errCh <- fmt.Errorf("Accept: %v", err) return } defer conn.Close() tc := textproto.NewConn(conn) tc.PrintfLine("220 hello world") msg, err := tc.ReadLine() if err != nil { errCh <- fmt.Errorf("ReadLine error: %v", err) return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 28.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/storage/cacher/ready_test.go
"sync" "testing" "time" ) func Test_newReady(t *testing.T) { errCh := make(chan error, 10) ready := newReady() ready.set(false) // create 10 goroutines waiting for ready for i := 0; i < 10; i++ { go func() { errCh <- ready.wait(context.Background()) }() } select { case <-time.After(1 * time.Second): case <-errCh: t.Errorf("ready should be blocking") } ready.set(true)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 16 13:32:11 UTC 2023 - 4.6K bytes - Viewed (0) -
pkg/scheduler/framework/parallelize/error_channel_test.go
import ( "context" "errors" "testing" ) func TestErrorChannel(t *testing.T) { errCh := NewErrorChannel() if actualErr := errCh.ReceiveError(); actualErr != nil { t.Errorf("expect nil from err channel, but got %v", actualErr) } err := errors.New("unknown error") errCh.SendError(err) if actualErr := errCh.ReceiveError(); actualErr != err { t.Errorf("expect %v from err channel, but got %v", err, actualErr) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 20 17:39:23 UTC 2021 - 1.3K bytes - Viewed (0) -
src/errors/example_test.go
} func ExampleJoin() { err1 := errors.New("err1") err2 := errors.New("err2") err := errors.Join(err1, err2) fmt.Println(err) if errors.Is(err, err1) { fmt.Println("err is err1") } if errors.Is(err, err2) { fmt.Println("err is err2") } // Output: // err1 // err2 // err is err1 // err is err2 } func ExampleIs() { if _, err := os.Open("non-existing"); err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 16 02:08:40 UTC 2023 - 2.2K bytes - Viewed (0) -
pkg/scheduler/framework/parallelize/error_channel.go
// are ignored, unless the existing error is received and the channel becomes empty // again. type ErrorChannel struct { errCh chan error } // SendError sends an error without blocking the sender. func (e *ErrorChannel) SendError(err error) { select { case e.errCh <- err: default: } } // SendErrorWithCancel sends an error without blocking the sender and calls // cancel function.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 20 17:39:23 UTC 2021 - 1.6K bytes - Viewed (0) -
src/net/http/roundtrip_js.go
case clHeader != "": cl, err := strconv.ParseInt(clHeader, 10, 64) if err != nil { errCh <- fmt.Errorf("net/http: ill-formed Content-Length header: %v", err) return nil } if cl < 0 { // Content-Length values less than 0 are invalid. // See: https://datatracker.ietf.org/doc/html/rfc2616/#section-14.13 errCh <- fmt.Errorf("net/http: invalid Content-Length header: %q", clHeader) return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.8K bytes - Viewed (0) -
src/errors/join_test.go
} } func TestJoin(t *testing.T) { err1 := errors.New("err1") err2 := errors.New("err2") for _, test := range []struct { errs []error want []error }{{ errs: []error{err1}, want: []error{err1}, }, { errs: []error{err1, err2}, want: []error{err1, err2}, }, { errs: []error{err1, nil, err2}, want: []error{err1, err2}, }} {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 17 21:48:12 UTC 2022 - 1.7K bytes - Viewed (0) -
src/net/sendfile_test.go
ln := newLocalListener(t, "tcp") defer ln.Close() errc := make(chan error, 1) go func(ln Listener) { // Wait for a connection. conn, err := ln.Accept() if err != nil { errc <- err close(errc) return } go func() { defer close(errc) defer conn.Close() f, err := os.Open(newton) if err != nil { errc <- err return } defer f.Close()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 18:12:56 UTC 2024 - 12.1K bytes - Viewed (0)