Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for ErrInvalid (0.12 sec)

  1. src/os/file_posix.go

    // be canceled and return immediately with an [ErrClosed] error.
    // Close will return an error if it has already been called.
    func (f *File) Close() error {
    	if f == nil {
    		return ErrInvalid
    	}
    	return f.file.close()
    }
    
    // read reads up to len(b) bytes from the File.
    // It returns the number of bytes read and an error, if any.
    func (f *File) read(b []byte) (n int, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/phases/certs/certlist.go

    }
    
    func createKeyAndCSR(kubeadmConfig *kubeadmapi.InitConfiguration, cert *KubeadmCert) error {
    	if kubeadmConfig == nil {
    		return errors.Errorf("%s: kubeadmConfig was nil", errInvalid)
    	}
    	if cert == nil {
    		return errors.Errorf("%s: cert was nil", errInvalid)
    	}
    	certDir := kubeadmConfig.CertificatesDir
    	name := cert.BaseName
    	if pkiutil.CSROrKeyExist(certDir, name) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  3. cmd/sftp-server-driver.go

    	stopFn := globalSftpMetrics.log(r, f.AccessKey())
    	defer stopFn(0, err)
    
    	flags := r.Pflags()
    	if !flags.Read {
    		// sanity check
    		return nil, os.ErrInvalid
    	}
    
    	bucket, object := path2BucketObject(r.Filepath)
    	if bucket == "" {
    		return nil, errors.New("bucket name cannot be empty")
    	}
    
    	clnt, err := f.getMinIOClient()
    	if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Jun 05 07:51:13 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/fakes_test.go

    // and the Err field describing the problem.
    //
    // Open should reject attempts to open names that do not satisfy
    // ValidPath(name), returning a *PathError with Err set to
    // ErrInvalid or ErrNotExist.
    func (ffs *fakeFsWithFakeFds) Open(name string) (fs.File, error) {
    	f, err := ffs.ReadDirFS.Open(name)
    	if err != nil {
    		return nil, err
    	}
    	return wrapFile(f), nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. misc/cgo/gmp/gmp.go

    func (z *Int) SetString(s string, base int) error {
    	z.doinit()
    	if base < 2 || base > 36 {
    		return os.ErrInvalid
    	}
    	p := C.CString(s)
    	defer C.free(unsafe.Pointer(p))
    	if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 {
    		return os.ErrInvalid
    	}
    	return nil
    }
    
    // String returns the decimal representation of z.
    func (z *Int) String() string {
    	if z == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  6. src/os/stat_windows.go

    	"unsafe"
    )
    
    // Stat returns the [FileInfo] structure describing file.
    // If there is an error, it will be of type [*PathError].
    func (file *File) Stat() (FileInfo, error) {
    	if file == nil {
    		return nil, ErrInvalid
    	}
    	return statHandle(file.name, file.pfd.Sysfd)
    }
    
    // stat implements both Stat and Lstat of a file.
    func stat(funcname, name string, followSurrogates bool) (FileInfo, error) {
    	if len(name) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 18:44:48 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. internal/s3select/select.go

    				gzip.ErrHeader, gzip.ErrChecksum,
    				s2.ErrCorrupt, s2.ErrUnsupported, s2.ErrCRC,
    				zstd.ErrBlockTooSmall, zstd.ErrMagicMismatch, zstd.ErrWindowSizeExceeded, zstd.ErrUnknownDictionary, zstd.ErrWindowSizeTooSmall,
    				lz4.ErrInvalid, lz4.ErrBlockDependency,
    			}
    			for _, e := range errs {
    				if errors.Is(err, e) {
    					return errInvalidCompression(err, s3Select.Input.CompressionType)
    				}
    			}
    			return err
    		}
    		return nil
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. src/os/os_test.go

    }
    
    // Test that all File methods give ErrInvalid if the receiver is nil.
    func TestNilFileMethods(t *testing.T) {
    	t.Parallel()
    
    	for _, tt := range nilFileMethodTests {
    		var file *File
    		got := tt.f(file)
    		if got != ErrInvalid {
    			t.Errorf("%v should fail when f is nil; got %v", tt.name, got)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  9. src/os/file.go

    func (dir dirFS) join(name string) (string, error) {
    	if dir == "" {
    		return "", errors.New("os: DirFS with empty root")
    	}
    	name, err := filepathlite.Localize(name)
    	if err != nil {
    		return "", ErrInvalid
    	}
    	if IsPathSeparator(dir[len(dir)-1]) {
    		return string(dir) + name, nil
    	}
    	return string(dir) + string(PathSeparator) + name, nil
    }
    
    // ReadFile reads the named file and returns the contents.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:37 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  10. src/net/http/fs_test.go

    func (f *fakeFile) Close() error               { return nil }
    func (f *fakeFile) Stat() (fs.FileInfo, error) { return f.fi, nil }
    func (f *fakeFile) Readdir(count int) ([]fs.FileInfo, error) {
    	if !f.fi.dir {
    		return nil, fs.ErrInvalid
    	}
    	var fis []fs.FileInfo
    
    	limit := f.entpos + count
    	if count <= 0 || limit > len(f.fi.ents) {
    		limit = len(f.fi.ents)
    	}
    	for ; f.entpos < limit; f.entpos++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 49.9K bytes
    - Viewed (0)
Back to top