Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for unwrap (0.18 sec)

  1. internal/bucket/versioning/error.go

    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.err }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.err == nil {
    		return "versioning: cause <nil>"
    	}
    	return e.err.Error()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  2. internal/logger/logonce.go

    	}
    }
    
    const unwrapErrsDepth = 3
    
    // unwrapErrs upto the point where errors.Unwrap(err) returns nil
    func unwrapErrs(err error) (leafErr error) {
    	uerr := errors.Unwrap(err)
    	depth := 1
    	for uerr != nil {
    		// Save the current `uerr`
    		leafErr = uerr
    		// continue to look for leaf errors underneath
    		uerr = errors.Unwrap(leafErr)
    		depth++
    		if depth == unwrapErrsDepth {
    			// If we have reached enough depth we
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  3. internal/bucket/replication/error.go

    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.err }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.err == nil {
    		return "replication: cause <nil>"
    	}
    	return e.err.Error()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  4. internal/rest/client_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package rest
    
    import (
    	"errors"
    	"net"
    	"net/url"
    	"testing"
    )
    
    func TestNetworkError_Unwrap(t *testing.T) {
    	tests := []struct {
    		name   string
    		err    error
    		target interface{}
    		want   bool
    	}{
    		{
    			name:   "url.Error",
    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)
  5. internal/bucket/lifecycle/error.go

    // the string as a value that satisfies error of type tagging.Error
    func Errorf(format string, a ...interface{}) error {
    	return Error{err: fmt.Errorf(format, a...)}
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.err }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.err == nil {
    		return "lifecycle: cause <nil>"
    	}
    	return e.err.Error()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1.3K bytes
    - Viewed (0)
  6. cmd/utils.go

    		return "", fmt.Errorf("id_token not found!")
    	}
    
    	// fmt.Printf("TOKEN: %s\n", rawIDToken)
    	return rawIDToken, nil
    }
    
    // unwrapAll will unwrap the returned error completely.
    func unwrapAll(err error) error {
    	for {
    		werr := errors.Unwrap(err)
    		if werr == nil {
    			return err
    		}
    		err = werr
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 31.3K bytes
    - Viewed (0)
  7. internal/crypto/error.go

    func Errorf(format string, a ...interface{}) error {
    	e := fmt.Errorf(format, a...)
    	ee := Error{}
    	ee.msg = e.Error()
    	ee.cause = errors.Unwrap(e)
    	return ee
    }
    
    // Unwrap the internal error.
    func (e Error) Unwrap() error { return e.cause }
    
    // Error 'error' compatible method.
    func (e Error) Error() string {
    	if e.msg == "" {
    		return "crypto: cause <nil>"
    	}
    	return e.msg
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  8. cmd/object-api-errors.go

    }
    
    // Unwrap the error.
    func (e InsufficientWriteQuorum) Unwrap() error {
    	return errErasureWriteQuorum
    }
    
    // GenericError - generic object layer error.
    type GenericError struct {
    	Bucket    string
    	Object    string
    	VersionID string
    	Err       error
    }
    
    // Unwrap the error to its underlying error.
    func (e GenericError) Unwrap() error {
    	return e.Err
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 00:31:12 GMT 2024
    - 21.3K bytes
    - Viewed (0)
  9. internal/etag/reader.go

    	if r.Tagger == nil {
    		return nil
    	}
    	return r.Tagger.ETag()
    }
    
    // Wrap returns an io.Reader that reads from the wrapped
    // io.Reader and implements the Tagger interaface.
    //
    // If content implements Tagger then the returned Reader
    // returns ETag of the content. Otherwise, it returns
    // nil as ETag.
    //
    // Wrap provides an adapter for io.Reader implementations
    // that don't implement the Tagger interface.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  10. internal/s3select/simdj/reader.go

    	return &Reader{
    		args:       args,
    		decoded:    ch,
    		err:        err,
    		readCloser: nil,
    	}
    }
    
    // safeCloser will wrap a Reader as a ReadCloser.
    // It is safe to call Close while the reader is being used.
    type safeCloser struct {
    	closed uint32
    	r      io.Reader
    }
    
    func (s *safeCloser) Read(p []byte) (n int, err error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 30 17:02:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
Back to top