Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for errNotExist (0.38 sec)

  1. src/cmd/go/internal/modcmd/verify.go

    		if zipErr != nil && errors.Is(zipErr, fs.ErrNotExist) &&
    			dirErr != nil && errors.Is(dirErr, fs.ErrNotExist) {
    			// Nothing downloaded yet. Nothing to verify.
    			return nil
    		}
    		errs = append(errs, fmt.Errorf("%s %s: missing ziphash: %v", mod.Path, mod.Version, err))
    		return errs
    	}
    	h := string(bytes.TrimSpace(data))
    
    	if zipErr != nil && errors.Is(zipErr, fs.ErrNotExist) {
    		// ok
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 16:56:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/os/error.go

    // report that a file or directory does not exist. It is satisfied by
    // [ErrNotExist] as well as some syscall errors.
    //
    // This function predates [errors.Is]. It only supports errors returned by
    // the os package. New code should use errors.Is(err, fs.ErrNotExist).
    func IsNotExist(err error) bool {
    	return underlyingErrorIs(err, ErrNotExist)
    }
    
    // IsPermission returns a boolean indicating whether the error is known to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. src/io/fs/fs.go

    	ErrNotExist   = errNotExist()   // "file does not exist"
    	ErrClosed     = errClosed()     // "file already closed"
    )
    
    func errInvalid() error    { return oserror.ErrInvalid }
    func errPermission() error { return oserror.ErrPermission }
    func errExist() error      { return oserror.ErrExist }
    func errNotExist() error   { return oserror.ErrNotExist }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 15 21:21:41 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. src/internal/syscall/windows/registry/value.go

    	QWORD                      = 11
    )
    
    var (
    	// ErrShortBuffer is returned when the buffer was too short for the operation.
    	ErrShortBuffer = syscall.ERROR_MORE_DATA
    
    	// ErrNotExist is returned when a registry key or value does not exist.
    	ErrNotExist = syscall.ERROR_FILE_NOT_FOUND
    
    	// ErrUnexpectedType is returned by Get*Value when the value's type was unexpected.
    	ErrUnexpectedType = errors.New("unexpected key value type")
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 20:01:34 UTC 2023
    - 11K bytes
    - Viewed (0)
  5. src/net/resolverdialfunc_test.go

    	// Any error returned aborts the dial and is returned unwrapped.
    	StartDial func(network, address string) error
    
    	Question func(dnsmessage.Header, dnsmessage.Question)
    
    	// err may be ErrNotExist or ErrRefused; others map to SERVFAIL (RCode2).
    	// A nil error means success.
    	HandleA    func(w AWriter, name string) error
    	HandleAAAA func(w AAAAWriter, name string) error
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modfetch/proxy.go

    	}
    
    	// We try to report the most helpful error to the user. "direct" and "noproxy"
    	// errors are best, followed by proxy errors other than ErrNotExist, followed
    	// by ErrNotExist.
    	//
    	// Note that errProxyOff, errNoproxy, and errUseProxy are equivalent to
    	// ErrNotExist. errUseProxy should only be returned if "noproxy" is the only
    	// proxy. errNoproxy should never be returned, since there should always be a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 03 15:21:05 UTC 2023
    - 13K bytes
    - Viewed (0)
  7. src/io/fs/sub_test.go

    // license that can be found in the LICENSE file.
    
    package fs_test
    
    import (
    	"errors"
    	. "io/fs"
    	"testing"
    )
    
    type subOnly struct{ SubFS }
    
    func (subOnly) Open(name string) (File, error) { return nil, ErrNotExist }
    
    func TestSub(t *testing.T) {
    	check := func(desc string, sub FS, err error) {
    		t.Helper()
    		if err != nil {
    			t.Errorf("Sub(sub): %v", err)
    			return
    		}
    		data, err := ReadFile(sub, "goodbye.txt")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 10 02:10:17 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  8. src/io/fs/readfile_test.go

    		Mode:    0456,
    		ModTime: time.Now(),
    		Sys:     &sysValue,
    	},
    }
    
    var sysValue int
    
    type readFileOnly struct{ ReadFileFS }
    
    func (readFileOnly) Open(name string) (File, error) { return nil, ErrNotExist }
    
    type openOnly struct{ FS }
    
    func TestReadFile(t *testing.T) {
    	// Test that ReadFile uses the method when present.
    	data, err := ReadFile(readFileOnly{testFsys}, "hello.txt")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:25:41 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  9. src/net/conf_test.go

    }
    
    // represents a dnsConfig returned by parsing a nonexistent resolv.conf
    var defaultResolvConf = &dnsConfig{
    	servers:  defaultNS,
    	ndots:    1,
    	timeout:  5,
    	attempts: 2,
    	err:      fs.ErrNotExist,
    }
    
    func TestConfHostLookupOrder(t *testing.T) {
    	// These tests are written for a system with cgo available,
    	// without using the netgo tag.
    	if netGoBuildTag {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:46:36 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  10. src/io/fs/glob_test.go

    	if err != path.ErrBadPattern {
    		t.Fatalf("Glob returned err=%v, want %v", err, path.ErrBadPattern)
    	}
    }
    
    type globOnly struct{ GlobFS }
    
    func (globOnly) Open(name string) (File, error) { return nil, ErrNotExist }
    
    func TestGlobMethod(t *testing.T) {
    	check := func(desc string, names []string, err error) {
    		t.Helper()
    		if err != nil || len(names) != 1 || names[0] != "hello.txt" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:36:52 UTC 2024
    - 2.3K bytes
    - Viewed (0)
Back to top