Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_error (0.17 sec)

  1. internal/rest/client_test.go

    		want   bool
    	}{
    		{
    			name:   "url.Error",
    			err:    &url.Error{Op: "PUT", URL: "http://localhost/1234", Err: restError("remote server offline")},
    			target: &url.Error{},
    			want:   true,
    		},
    		{
    			name: "net.Error",
    			err:  &url.Error{Op: "PUT", URL: "http://localhost/1234", Err: restError("remote server offline")},
    			want: true,
    		},
    		{
    			name: "net.Error-unmatched",
    			err:  errors.New("something"),
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 16 17:28:29 GMT 2021
    - 1.9K bytes
    - Viewed (0)
  2. internal/rest/client.go

    	newAuthToken func(audience string) string
    
    	sync.RWMutex // mutex for lastErr
    	lastErr      error
    	lastErrTime  time.Time
    }
    
    type restError string
    
    func (e restError) Error() string {
    	return string(e)
    }
    
    func (e restError) Timeout() bool {
    	return true
    }
    
    // Given a string of the form "host", "host:port", or "[ipv6::address]:port",
    // return true if the string includes a port.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
Back to top