Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MyError (0.21 sec)

  1. src/runtime/chanbarrier_test.go

    )
    
    type response struct {
    }
    
    type myError struct {
    }
    
    func (myError) Error() string { return "" }
    
    func doRequest(useSelect bool) (*response, error) {
    	type async struct {
    		resp *response
    		err  error
    	}
    	ch := make(chan *async, 0)
    	done := make(chan struct{}, 0)
    
    	if useSelect {
    		go func() {
    			select {
    			case ch <- &async{resp: nil, err: myError{}}:
    			case <-done:
    			}
    		}()
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 17:50:18 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  2. src/errors/wrap.go

    //
    // An error type might provide an Is method so it can be treated as equivalent
    // to an existing error. For example, if MyError defines
    //
    //	func (m MyError) Is(target error) bool { return target == fs.ErrExist }
    //
    // then Is(MyError{}, fs.ErrExist) returns true. See [syscall.Errno.Is] for
    // an example in the standard library. An Is method should only shallowly
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:04 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top