Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for Flush (0.2 sec)

  1. src/archive/tar/writer.go

    	io.Writer
    	fileState
    
    	ReadFrom(io.Reader) (int64, error)
    }
    
    // Flush finishes writing the current file's block padding.
    // The current file must be fully written before Flush can be called.
    //
    // This is unnecessary as the next call to [Writer.WriteHeader] or [Writer.Close]
    // will implicitly flush out the file's padding.
    func (tw *Writer) Flush() error {
    	if tw.err != nil {
    		return tw.err
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  2. src/bufio/example_test.go

    	fmt.Fprint(w, "Hello, ")
    	fmt.Fprint(w, "world!")
    	w.Flush() // Don't forget to flush!
    	// Output: Hello, world!
    }
    
    func ExampleWriter_AvailableBuffer() {
    	w := bufio.NewWriter(os.Stdout)
    	for _, i := range []int64{1, 2, 3, 4} {
    		b := w.AvailableBuffer()
    		b = strconv.AppendInt(b, i, 10)
    		b = append(b, ' ')
    		w.Write(b)
    	}
    	w.Flush()
    	// Output: 1 2 3 4
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. src/bufio/bufio_test.go

    	str := strings.Repeat("x", 1<<10)
    	bs := []byte(str)
    	for i := 0; i < b.N; i++ {
    		bw := NewWriter(io.Discard)
    		bw.Flush()
    		bw.WriteByte('a')
    		bw.Flush()
    		bw.WriteRune('B')
    		bw.Flush()
    		bw.Write(bs)
    		bw.Flush()
    		bw.WriteString(str)
    		bw.Flush()
    	}
    }
    
    func BenchmarkWriterFlush(b *testing.B) {
    	b.ReportAllocs()
    	bw := NewWriter(io.Discard)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  4. src/cmd/asm/main.go

    		// the same list with -gcflags=-spectre=LIST and -asmflags=-spectrre=LIST
    	case "all", "ret":
    		ctxt.Retpoline = true
    	}
    
    	ctxt.Bso = bufio.NewWriter(os.Stdout)
    	defer ctxt.Bso.Flush()
    
    	architecture.Init(ctxt)
    
    	// Create object file, write header.
    	buf, err := bio.Create(*flags.OutputFile)
    	if err != nil {
    		log.Fatal(err)
    	}
    	defer buf.Close()
    
    	if !*flags.SymABIs {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  5. api/go1.1.txt

    pkg syscall (darwin-386), const IP_DUMMYNET_DEL = 61
    pkg syscall (darwin-386), const IP_DUMMYNET_FLUSH = 62
    pkg syscall (darwin-386), const IP_DUMMYNET_GET = 64
    pkg syscall (darwin-386), const IP_FAITH = 22
    pkg syscall (darwin-386), const IP_FW_ADD = 40
    pkg syscall (darwin-386), const IP_FW_DEL = 41
    pkg syscall (darwin-386), const IP_FW_FLUSH = 42
    pkg syscall (darwin-386), const IP_FW_GET = 44
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Mar 31 20:37:15 GMT 2022
    - 2.6M bytes
    - Viewed (0)
  6. src/archive/zip/register.go

    package zip
    
    import (
    	"compress/flate"
    	"errors"
    	"io"
    	"sync"
    )
    
    // A Compressor returns a new compressing writer, writing to w.
    // The WriteCloser's Close method must be used to flush pending data to w.
    // The Compressor itself must be safe to invoke from multiple goroutines
    // simultaneously, but each returned writer will be used only by
    // one goroutine at a time.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. src/bufio/bufio.go

    // Writer implements buffering for an [io.Writer] object.
    // If an error occurs writing to a [Writer], no more data will be
    // accepted and all subsequent writes, and [Writer.Flush], will return the error.
    // After all data has been written, the client should call the
    // [Writer.Flush] method to guarantee all data has been forwarded to
    // the underlying [io.Writer].
    type Writer struct {
    	err error
    	buf []byte
    	n   int
    	wr  io.Writer
    }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  8. src/archive/zip/writer_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if buf.Len() > 0 {
    		t.Fatalf("Unexpected %d bytes already in buffer", buf.Len())
    	}
    	if err := w.Flush(); err != nil {
    		t.Fatal(err)
    	}
    	if buf.Len() == 0 {
    		t.Fatal("No bytes written after Flush")
    	}
    }
    
    func TestWriterDir(t *testing.T) {
    	w := NewWriter(io.Discard)
    	dw, err := w.Create("dir/")
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  9. api/go1.20.txt

    pkg syscall (freebsd-riscv64), const IPV6_FW_DEL = 31 #53466
    pkg syscall (freebsd-riscv64), const IPV6_FW_DEL ideal-int #53466
    pkg syscall (freebsd-riscv64), const IPV6_FW_FLUSH = 32 #53466
    pkg syscall (freebsd-riscv64), const IPV6_FW_FLUSH ideal-int #53466
    pkg syscall (freebsd-riscv64), const IPV6_FW_GET = 34 #53466
    pkg syscall (freebsd-riscv64), const IPV6_FW_GET ideal-int #53466
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 17 21:23:32 GMT 2023
    - 602.6K bytes
    - Viewed (0)
  10. misc/go_android_exec/main.go

    	n := len(data)
    	f.buf.Write(data)
    	// Flush to w until a potential match of exitRe
    	b := f.buf.Bytes()
    	match := f.exitRe.FindIndex(b)
    	if match == nil {
    		// Flush all of the buffer.
    		_, err := f.w.Write(b)
    		f.buf.Reset()
    		if err != nil {
    			return n, err
    		}
    	} else {
    		// Flush up to the beginning of the (potential) match.
    		_, err := f.w.Write(b[:match[0]])
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
Back to top