Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 440 for readFull (0.13 sec)

  1. cmd/erasure-heal_test.go

    		if err != nil {
    			t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err)
    		}
    		data := make([]byte, test.size)
    		if _, err = io.ReadFull(rand.Reader, data); err != nil {
    			t.Fatalf("Test %d: failed to create random test data: %v", i, err)
    		}
    		buffer := make([]byte, test.blocksize, 2*test.blocksize)
    		writers := make([]io.Writer, len(disks))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jan 30 20:43:25 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. src/internal/xcoff/file.go

    		impoff = lhdr.Limpoff
    	}
    
    	// Read loader import file ID table
    	if _, err := s.sr.Seek(int64(impoff), io.SeekStart); err != nil {
    		return nil, err
    	}
    	table := make([]byte, istlen)
    	if _, err := io.ReadFull(s.sr, table); err != nil {
    		return nil, err
    	}
    
    	offset := 0
    	// First import file ID is the default LIBPATH value
    	libpath := cstring(table[offset:])
    	f.LibraryPaths = strings.Split(libpath, ":")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 12 14:42:29 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  3. src/net/parse.go

    		ok = true
    	}
    	return
    }
    
    func (f *file) readLine() (s string, ok bool) {
    	if s, ok = f.getLineFromData(); ok {
    		return
    	}
    	if len(f.data) < cap(f.data) {
    		ln := len(f.data)
    		n, err := io.ReadFull(f.file, f.data[ln:cap(f.data)])
    		if n >= 0 {
    			f.data = f.data[0 : ln+n]
    		}
    		if err == io.EOF || err == io.ErrUnexpectedEOF {
    			f.atEOF = true
    		}
    	}
    	s, ok = f.getLineFromData()
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  4. src/cmd/internal/codesign/codesign.go

    	// and the host is linux/amd64. So we use NOT-SHA256
    	// and then apply a NOT ourselves to get SHA256. Sigh.
    	var buf [pageSize]byte
    	h := notsha256.New()
    	p := 0
    	for p < int(codeSize) {
    		n, err := io.ReadFull(data, buf[:])
    		if err == io.EOF {
    			break
    		}
    		if err != nil && err != io.ErrUnexpectedEOF {
    			panic(err)
    		}
    		if p+n > int(codeSize) {
    			n = int(codeSize) - p
    		}
    		p += n
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:19 UTC 2022
    - 8.3K bytes
    - Viewed (0)
  5. src/os/exec/exec_posix_test.go

    	// Wait for the child process to come up and register any signal handlers.
    	const msg = "O:ping\n"
    	if _, err := io.WriteString(stdin, msg); err != nil {
    		t.Fatal(err)
    	}
    	buf := make([]byte, len(msg))
    	if _, err := io.ReadFull(stdout, buf); err != nil {
    		t.Fatal(err)
    	}
    	// Now leave the pipes open so that the process will hang until we close stdin.
    
    	if err := cmd.Process.Signal(syscall.SIGSTOP); err != nil {
    		cmd.Process.Kill()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 20:21:32 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  6. src/internal/trace/internal/oldtrace/parser.go

    		}
    		_, err = seeker.Seek(cur, io.SeekStart)
    		if err != nil {
    			return nil, err
    		}
    
    		buf = make([]byte, end-cur)
    		_, err = io.ReadFull(r, buf)
    		if err != nil {
    			return nil, err
    		}
    	} else {
    		var err error
    		buf, err = io.ReadAll(r)
    		if err != nil {
    			return nil, err
    		}
    	}
    	return &parser{data: buf, ver: ver, timerGoids: make(map[uint64]bool)}, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:15:28 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  7. src/crypto/x509/pem_decrypt.go

    	ciph := cipherByKey(alg)
    	if ciph == nil {
    		return nil, errors.New("x509: unknown encryption mode")
    	}
    	iv := make([]byte, ciph.blockSize)
    	if _, err := io.ReadFull(rand, iv); err != nil {
    		return nil, errors.New("x509: cannot generate IV: " + err.Error())
    	}
    	// The salt is the first 8 bytes of the initialization vector,
    	// matching the key derivation in DecryptPEMBlock.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  8. src/net/http/responsecontroller_test.go

    		b := make([]byte, 3)
    		n, err := io.ReadFull(r.Body, b)
    		b = b[:n]
    		if err != nil || string(b) != "one" {
    			t.Errorf("before setting read deadline: Read = %v, %q, want nil, %q", err, string(b), "one")
    			return
    		}
    		if err := ctl.SetReadDeadline(time.Now()); err != nil {
    			t.Errorf("ctl.SetReadDeadline() = %v, want nil", err)
    			return
    		}
    		b, err = io.ReadAll(r.Body)
    		if err == nil || string(b) != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 19:20:31 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. src/runtime/crash_unix_test.go

    	if err := pw.Close(); err != nil {
    		t.Log("closing write pipe: ", err)
    	}
    	defer pr.Close()
    
    	// Wait for "x\nx\n" to indicate almost-readiness.
    	buf := make([]byte, 4)
    	_, err = io.ReadFull(pr, buf)
    	if err != nil || string(buf) != "x\nx\n" {
    		t.Fatal("subprocess failed; output:\n", string(buf))
    	}
    
    	// The child blockers print "x\n" and then block on a lock. Receiving
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 20:11:47 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  10. src/compress/lzw/reader_test.go

    }
    
    func TestHiCodeDoesNotOverflow(t *testing.T) {
    	r := NewReader(devZero{}, LSB, 8)
    	d := r.(*Reader)
    	buf := make([]byte, 1024)
    	oldHi := uint16(0)
    	for i := 0; i < 100; i++ {
    		if _, err := io.ReadFull(r, buf); err != nil {
    			t.Fatalf("i=%d: %v", i, err)
    		}
    		// The hi code should never decrease.
    		if d.hi < oldHi {
    			t.Fatalf("i=%d: hi=%d decreased from previous value %d", i, d.hi, oldHi)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 16:57:58 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top