Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 123 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 30 11:13:12 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 30 11:13:12 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. internal/ioutil/ioutil_test.go

    	}
    }
    
    func TestCloseOnWriter(t *testing.T) {
    	writer := WriteOnClose(io.Discard)
    	if writer.HasWritten() {
    		t.Error("WriteOnCloser must not be marked as HasWritten")
    	}
    	writer.Write(nil)
    	if !writer.HasWritten() {
    		t.Error("WriteOnCloser must be marked as HasWritten")
    	}
    
    	writer = WriteOnClose(io.Discard)
    	writer.Close()
    	if !writer.HasWritten() {
    		t.Error("WriteOnCloser must be marked as HasWritten")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 11:02:31 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  5. 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)
  6. 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 May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/configdump.go

    	"sigs.k8s.io/yaml"
    
    	"istio.io/istio/istioctl/pkg/util/configdump"
    	sdscompare "istio.io/istio/istioctl/pkg/writer/compare/sds"
    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    // ConfigWriter is a writer for processing responses from the Envoy Admin config_dump endpoint
    type ConfigWriter struct {
    	Stdout     io.Writer
    	configDump *configdump.Wrapper
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 29 20:46:41 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  8. istioctl/pkg/tag/tag.go

    }
    
    // listTags lists existing revision.
    func listTags(ctx context.Context, kubeClient kubernetes.Interface, writer io.Writer) error {
    	tagWebhooks, err := GetRevisionWebhooks(ctx, kubeClient)
    	if err != nil {
    		return fmt.Errorf("failed to retrieve revision tags: %v", err)
    	}
    	if len(tagWebhooks) == 0 {
    		fmt.Fprintf(writer, "No Istio revision tag MutatingWebhookConfigurations to list\n")
    		return nil
    	}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. istioctl/pkg/admin/istiodconfig.go

    	"istio.io/istio/pkg/log"
    )
    
    type flagState interface {
    	run(out io.Writer) error
    }
    
    var (
    	_ flagState = (*resetState)(nil)
    	_ flagState = (*logLevelState)(nil)
    	_ flagState = (*stackTraceLevelState)(nil)
    	_ flagState = (*getAllLogLevelsState)(nil)
    )
    
    type resetState struct {
    	client *ControlzClient
    }
    
    func (rs *resetState) run(_ io.Writer) error {
    	const (
    		defaultOutputLevel     = "info"
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  10. operator/cmd/mesh/profile-diff.go

    	}
    	return profileDiffInternal(args[0], args[1], setFlags, cmd.OutOrStdout(), l)
    }
    
    func profileDiffInternal(profileA, profileB string, setFlags []string, writer io.Writer, l clog.Logger) (bool, error) {
    	a, _, err := manifest.GenIOPFromProfile(profileA, "", setFlags, true, true, nil, l)
    	if err != nil {
    		return false, fmt.Errorf("could not read %q: %v", profileA, err)
    	}
    
    Go
    - Registered: Wed Mar 20 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 3.1K bytes
    - Viewed (0)
Back to top