Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for buffer (0.33 sec)

  1. src/bufio/bufio.go

    	b.n = 0
    	return nil
    }
    
    // Available returns how many bytes are unused in the buffer.
    func (b *Writer) Available() int { return len(b.buf) - b.n }
    
    // AvailableBuffer returns an empty buffer with b.Available() capacity.
    // This buffer is intended to be appended to and
    // passed to an immediately succeeding [Writer.Write] call.
    // The buffer is only valid until the next write operation on b.
    func (b *Writer) AvailableBuffer() []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/test/inl_test.go

    		"runtime/internal/math": {
    			"MulUintptr",
    		},
    		"bytes": {
    			"(*Buffer).Bytes",
    			"(*Buffer).Cap",
    			"(*Buffer).Len",
    			"(*Buffer).Grow",
    			"(*Buffer).Next",
    			"(*Buffer).Read",
    			"(*Buffer).ReadByte",
    			"(*Buffer).Reset",
    			"(*Buffer).String",
    			"(*Buffer).UnreadByte",
    			"(*Buffer).tryGrowByReslice",
    		},
    		"internal/abi": {
    			"UseInterfaceSwitchCache",
    		},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  3. src/bytes/buffer_test.go

    	// Confirm that when Reader panics, the empty buffer remains empty
    	var buf2 Buffer
    	defer func() {
    		recover()
    		check(t, "TestReadFromPanicReader (2)", &buf2, "")
    	}()
    	buf2.ReadFrom(panicReader{panic: true})
    }
    
    func TestReadFromNegativeReader(t *testing.T) {
    	var b Buffer
    	defer func() {
    		switch err := recover().(type) {
    		case nil:
    			t.Fatal("bytes.Buffer.ReadFrom didn't panic")
    		case error:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:31:36 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  4. src/archive/tar/writer_test.go

    		t.Fatal(err)
    	}
    	if hdr.Name != longName {
    		t.Fatal("Couldn't recover long name")
    	}
    }
    
    func TestValidTypeflagWithPAXHeader(t *testing.T) {
    	var buffer bytes.Buffer
    	tw := NewWriter(&buffer)
    
    	fileName := strings.Repeat("ab", 100)
    
    	hdr := &Header{
    		Name:     fileName,
    		Size:     4,
    		Typeflag: 0,
    	}
    	if err := tw.WriteHeader(hdr); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types/fmt.go

    	}
    
    	q := pkgqual(s.Pkg, verb, mode)
    	if q == "" {
    		return s.Name
    	}
    
    	buf := fmtBufferPool.Get().(*bytes.Buffer)
    	buf.Reset()
    	defer fmtBufferPool.Put(buf)
    
    	buf.WriteString(q)
    	buf.WriteByte('.')
    	buf.WriteString(s.Name)
    	return InternString(buf.Bytes())
    }
    
    func sconv2(b *bytes.Buffer, s *Sym, verb rune, mode fmtMode) {
    	if verb == 'L' {
    		panic("linksymfmt")
    	}
    	if s == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/typestring.go

    // package-level objects, and may be nil.
    func TypeString(typ Type, qf Qualifier) string {
    	var buf bytes.Buffer
    	WriteType(&buf, typ, qf)
    	return buf.String()
    }
    
    // WriteType writes the string representation of typ to buf.
    // The [Qualifier] controls the printing of
    // package-level objects, and may be nil.
    func WriteType(buf *bytes.Buffer, typ Type, qf Qualifier) {
    	newTypeWriter(buf, qf).typ(typ)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/README

    	after substituting variables from the script environment.
    	File1 can be 'stdout' or 'stderr' to compare the script's
    	stdout or stderr buffer.
    
    cp src... dst
    	copy files to a target file or directory
    
    	src can include 'stdout' or 'stderr' to copy from the
    	script's stdout or stderr buffer.
    
    echo string...
    	display a line of text
    
    
    env [key[=value]...]
    	set or log the values of environment variables
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/writebarrier.go

    		// srcs contains the value IDs of pointer values we've put in the write barrier buffer.
    		srcs := sset
    		srcs.clear()
    		// dsts contains the value IDs of locations which we've read a pointer out of
    		// and put the result in the write barrier buffer.
    		dsts := sset2
    		dsts.clear()
    
    		for _, w := range stores {
    			if w.Op != OpStoreWB {
    				continue
    			}
    			pos := w.Pos
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:09:14 UTC 2023
    - 23.5K bytes
    - Viewed (0)
  9. src/cmd/doc/pkg.go

    	w.Write(pr.Text(d))
    }
    
    // pkgBuffer is a wrapper for bytes.Buffer that prints a package clause the
    // first time Write is called.
    type pkgBuffer struct {
    	pkg     *Package
    	printed bool // Prevent repeated package clauses.
    	bytes.Buffer
    }
    
    func (pb *pkgBuffer) Write(p []byte) (int, error) {
    	pb.packageClause()
    	return pb.Buffer.Write(p)
    }
    
    func (pb *pkgBuffer) packageClause() {
    	if !pb.printed {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  10. src/cmd/go/internal/script/cmds.go

    			return []int{i + 1}
    		}
    	}
    	return nil
    }
    
    // Cat writes the concatenated contents of the named file(s) to the script's
    // stdout buffer.
    func Cat() Cmd {
    	return Command(
    		CmdUsage{
    			Summary: "concatenate files and print to the script's stdout buffer",
    			Args:    "files...",
    		},
    		func(s *State, args ...string) (WaitFunc, error) {
    			if len(args) == 0 {
    				return nil, ErrUsage
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top