Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 128 for Writer (0.2 sec)

  1. src/archive/zip/writer.go

    // for the file metadata. [Writer] takes ownership of fh and may mutate
    // its fields. The caller must not modify fh after calling [Writer.CreateHeader].
    //
    // This returns a [Writer] to which the file contents should be written.
    // The file's contents must be written to the io.Writer before the next
    // call to [Writer.Create], [Writer.CreateHeader], [Writer.CreateRaw], or [Writer.Close].
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  2. src/archive/tar/writer_test.go

    		}
    	}
    }
    
    // testNonEmptyWriter wraps an io.Writer and ensures that
    // Write is never called with an empty buffer.
    type testNonEmptyWriter struct{ io.Writer }
    
    func (w testNonEmptyWriter) Write(b []byte) (int, error) {
    	if len(b) == 0 {
    		return 0, errors.New("unexpected empty Write call")
    	}
    	return w.Writer.Write(b)
    }
    
    func TestFileWriter(t *testing.T) {
    	type (
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  3. internal/ioutil/ioutil.go

    // executes at least one write operation if it is closed.
    //
    // This can be useful within the context of HTTP. At least
    // one write operation must happen to send the HTTP headers
    // to the peer.
    type WriteOnCloser struct {
    	io.Writer
    	hasWritten bool
    }
    
    func (w *WriteOnCloser) Write(p []byte) (int, error) {
    	w.hasWritten = true
    	return w.Writer.Write(p)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  4. operator/cmd/mesh/shared.go

    }
    
    type Printer interface {
    	Printf(format string, a ...any)
    	Println(string)
    }
    
    func NewPrinterForWriter(w io.Writer) Printer {
    	return &writerPrinter{writer: w}
    }
    
    type writerPrinter struct {
    	writer io.Writer
    }
    
    func (w *writerPrinter) Printf(format string, a ...any) {
    	_, _ = fmt.Fprintf(w.writer, format, a...)
    }
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  5. istioctl/pkg/describe/describe.go

    			cfgNames += ", "
    		}
    	}
    	fmt.Fprintf(writer, "   %s\n", cfgNames)
    }
    
    func printPeerAuthentication(writer io.Writer, pa authn.MergedPeerAuthentication) {
    	fmt.Fprintf(writer, "Effective PeerAuthentication:\n")
    	fmt.Fprintf(writer, "   Workload mTLS mode: %s\n", pa.Mode.String())
    	if len(pa.PerPort) != 0 {
    		fmt.Fprintf(writer, "   Port Level mTLS mode:\n")
    		for port, mode := range pa.PerPort {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  6. cmd/erasure-encode.go

    import (
    	"context"
    	"fmt"
    	"io"
    	"sync"
    )
    
    // Writes in parallel to writers
    type parallelWriter struct {
    	writers     []io.Writer
    	writeQuorum int
    	errs        []error
    }
    
    // Write writes data to writers in parallel.
    func (p *parallelWriter) Write(ctx context.Context, blocks [][]byte) error {
    	var wg sync.WaitGroup
    
    	for i := range p.writers {
    		if p.writers[i] == nil {
    			p.errs[i] = errDiskNotFound
    			continue
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 3K bytes
    - Viewed (0)
  7. istioctl/pkg/internaldebug/internal-debug.go

    				mappedResp[id] = string(resource.Value) + "\n"
    			} else {
    				_, _ = s.Writer.Write(resource.Value)
    				_, _ = s.Writer.Write([]byte("\n"))
    			}
    		}
    	}
    	if len(mappedResp) > 0 {
    		mresp, err := json.MarshalIndent(mappedResp, "", "  ")
    		if err != nil {
    			return err
    		}
    		_, _ = s.Writer.Write(mresp)
    		_, _ = s.Writer.Write([]byte("\n"))
    	}
    
    	return nil
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 04:16:55 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  8. src/archive/zip/zip_test.go

    	}
    	for i := 0; i < chunks; i++ {
    		_, err := f.Write(chunk)
    		if err != nil {
    			t.Fatal("write chunk:", err)
    		}
    	}
    	if frag := int(size % chunkSize); frag > 0 {
    		_, err := f.Write(chunk[:frag])
    		if err != nil {
    			t.Fatal("write chunk:", err)
    		}
    	}
    	end := []byte("END\n")
    	_, err = f.Write(end)
    	if err != nil {
    		t.Fatal("write end:", err)
    	}
    	if err := w.Close(); err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  9. cmd/local-locker_gen.go

    		return
    	}
    	err = en.WriteBool(z.Writer)
    	if err != nil {
    		err = msgp.WrapError(err, "Writer")
    		return
    	}
    	// write "UID"
    	err = en.Append(0xa3, 0x55, 0x49, 0x44)
    	if err != nil {
    		return
    	}
    	err = en.WriteString(z.UID)
    	if err != nil {
    		err = msgp.WrapError(err, "UID")
    		return
    	}
    	// write "Timestamp"
    	err = en.Append(0xa9, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70)
    	if err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/configdump.go

    	"encoding/json"
    	"fmt"
    	"io"
    	"text/tabwriter"
    
    	"sigs.k8s.io/yaml"
    )
    
    // ConfigWriter is a writer for processing responses from the Ztunnel Admin config_dump endpoint
    type ConfigWriter struct {
    	Stdout      io.Writer
    	ztunnelDump *ZtunnelDump
    	FullDump    []byte
    }
    
    // Prime loads the config dump into the writer ready for printing
    func (c *ConfigWriter) Prime(b []byte) error {
    	cd := ZtunnelDump{}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 23 21:30:30 GMT 2024
    - 2.8K bytes
    - Viewed (0)
Back to top