Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 184 for Writer (0.17 sec)

  1. src/archive/tar/writer.go

    	"path"
    	"sort"
    	"strings"
    	"time"
    )
    
    // Writer provides sequential writing of a tar archive.
    // [Writer.WriteHeader] begins a new file with the provided [Header],
    // and then Writer can be treated as an io.Writer to supply that file's data.
    type Writer struct {
    	w    io.Writer
    	pad  int64      // Amount of padding to write after current file entry
    	curr fileWriter // Writer for current file entry
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  2. 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)
  3. src/archive/zip/writer_test.go

    	w := NewWriter(io.Discard)
    	dw, err := w.Create("dir/")
    	if err != nil {
    		t.Fatal(err)
    	}
    	if _, err := dw.Write(nil); err != nil {
    		t.Errorf("Write(nil) to directory: got %v, want nil", err)
    	}
    	if _, err := dw.Write([]byte("hello")); err == nil {
    		t.Error(`Write("hello") to directory: got nil error, want non-nil`)
    	}
    }
    
    func TestWriterDirAttributes(t *testing.T) {
    	var buf bytes.Buffer
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  4. 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)
  5. statement.go

    		writer.WriteByte('(')
    		for idx, d := range v {
    			if idx > 0 {
    				writer.WriteByte(',')
    			}
    			stmt.QuoteTo(writer, d)
    		}
    		writer.WriteByte(')')
    	case clause.Expr:
    		v.Build(stmt)
    	case string:
    		stmt.DB.Dialector.QuoteTo(writer, v)
    	case []string:
    		writer.WriteByte('(')
    		for idx, d := range v {
    			if idx > 0 {
    				writer.WriteByte(',')
    			}
    			stmt.DB.Dialector.QuoteTo(writer, d)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  6. 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)
  7. logger/logger.go

    const (
    	// Silent silent log level
    	Silent LogLevel = iota + 1
    	// Error error log level
    	Error
    	// Warn warn log level
    	Warn
    	// Info info log level
    	Info
    )
    
    // Writer log writer interface
    type Writer interface {
    	Printf(string, ...interface{})
    }
    
    // Config logger config
    type Config struct {
    	SlowThreshold             time.Duration
    	Colorful                  bool
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  8. src/bufio/bufio.go

    // size. If the argument io.Writer is already a [Writer] with large enough
    // size, it returns the underlying [Writer].
    func NewWriterSize(w io.Writer, size int) *Writer {
    	// Is it already a Writer?
    	b, ok := w.(*Writer)
    	if ok && len(b.buf) >= size {
    		return b
    	}
    	if size <= 0 {
    		size = defaultBufSize
    	}
    	return &Writer{
    		buf: make([]byte, size),
    		wr:  w,
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  9. istioctl/pkg/injector/injector-list.go

    		return filtered[i].Name < filtered[j].Name
    	})
    	return filtered, nil
    }
    
    func printNS(writer io.Writer, namespaces []corev1.Namespace, hooks []admitv1.MutatingWebhookConfiguration,
    	allPods map[resource.Namespace][]corev1.Pod,
    ) error {
    	outputCount := 0
    
    	w := new(tabwriter.Writer).Init(writer, 0, 8, 1, ' ', 0)
    	for _, namespace := range namespaces {
    		revision := getInjectedRevision(&namespace, hooks)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jan 04 03:08:06 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  10. 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)
Back to top