Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 2,154 for write1 (0.15 sec)

  1. src/mime/multipart/writer.go

    	"errors"
    	"fmt"
    	"io"
    	"net/textproto"
    	"slices"
    	"strings"
    )
    
    // A Writer generates multipart messages.
    type Writer struct {
    	w        io.Writer
    	boundary string
    	lastpart *part
    }
    
    // NewWriter returns a new multipart [Writer] with a random boundary,
    // writing to w.
    func NewWriter(w io.Writer) *Writer {
    	return &Writer{
    		w:        w,
    		boundary: randomBoundary(),
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/util/flushwriter/writer.go

    limitations under the License.
    */
    
    package flushwriter
    
    import (
    	"io"
    	"net/http"
    )
    
    // Wrap wraps an io.Writer into a writer that flushes after every write if
    // the writer implements the Flusher interface.
    func Wrap(w io.Writer) io.Writer {
    	fw := &flushWriter{
    		writer: w,
    	}
    	if flusher, ok := w.(http.Flusher); ok {
    		fw.flusher = flusher
    	}
    	return fw
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 05 16:09:42 UTC 2017
    - 1.3K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/compare/sds/writer.go

    }
    
    // NewSDSWriter generates a new instance which conforms to SDSWriter interface
    func NewSDSWriter(w io.Writer, format Format) SDSWriter {
    	return &sdsWriter{
    		w:      w,
    		output: format,
    	}
    }
    
    // sdsWriter is provided concrete implementation of SDSWriter
    type sdsWriter struct {
    	w      io.Writer
    	output Format
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 21 14:17:23 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/table/writer.go

    	"io"
    	"strings"
    	"unicode/utf8"
    
    	"github.com/fatih/color"
    )
    
    type ColoredTableWriter struct {
    	writer     io.Writer
    	header     Row
    	rows       []Row
    	addRowFunc func(obj interface{}) Row
    }
    
    func NewStyleWriter(writer io.Writer) *ColoredTableWriter {
    	return &ColoredTableWriter{
    		writer: writer,
    		rows:   make([]Row, 0),
    		header: Row{},
    	}
    }
    
    type BuildRowFunc func(obj interface{}) Row
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Oct 08 04:41:42 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  5. src/internal/poll/writev.go

    				break // continue chunk on next writev
    			}
    			iovecs[len(iovecs)-1].SetLen(len(chunk))
    			if len(iovecs) == maxVec {
    				break
    			}
    		}
    		if len(iovecs) == 0 {
    			break
    		}
    		if fd.iovecs == nil {
    			fd.iovecs = new([]syscall.Iovec)
    		}
    		*fd.iovecs = iovecs // cache
    
    		var wrote uintptr
    		wrote, err = writev(fd.Sysfd, iovecs)
    		if wrote == ^uintptr(0) {
    			wrote = 0
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/outbuf.go

    func (out *OutBuf) WriteByte(v byte) error {
    	out.Write8(v)
    	return nil
    }
    
    func (out *OutBuf) Write16(v uint16) {
    	out.arch.ByteOrder.PutUint16(out.encbuf[:], v)
    	out.Write(out.encbuf[:2])
    }
    
    func (out *OutBuf) Write32(v uint32) {
    	out.arch.ByteOrder.PutUint32(out.encbuf[:], v)
    	out.Write(out.encbuf[:4])
    }
    
    func (out *OutBuf) Write32b(v uint32) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modindex/write.go

    	e.b = binary.LittleEndian.AppendUint32(e.b, n)
    }
    
    // Int encodes n. Note that all ints are written to the index as uint32s,
    // and to avoid problems on 32-bit systems we require fitting into a 32-bit int.
    func (e *encoder) Int(n int) {
    	if n < 0 || int(int32(n)) != n {
    		base.Fatalf("go: attempting to write an int to the index that overflows int32")
    	}
    	e.Uint32(uint32(n))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 10:10:21 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. src/compress/gzip/gzip.go

    }
    
    // NewWriter returns a new [Writer].
    // Writes to the returned writer are compressed and written to w.
    //
    // It is the caller's responsibility to call Close on the [Writer] when done.
    // Writes may be buffered and not flushed until Close.
    //
    // Callers that wish to set the fields in Writer.Header must do so before
    // the first call to Write, Flush, or Close.
    func NewWriter(w io.Writer) *Writer {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. pkg/kubelet/util/ioutils/ioutils.go

    // applied to the writer interface.
    // LimitWriter returns a Writer that writes to w
    // but stops with EOF after n bytes.
    // The underlying implementation is a *LimitedWriter.
    func LimitWriter(w io.Writer, n int64) io.Writer { return &LimitedWriter{w, n} }
    
    // A LimitedWriter writes to W but limits the amount of
    // data returned to just N bytes. Each call to Write
    // updates N to reflect the new amount remaining.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 12:00:49 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  10. platforms/jvm/language-java/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContextTest.groovy

        def writer = new StringWriter()
        @Subject context = new JavadocOptionFileWriterContext(writer)
    
        def "writes"() {
            when: context.write("dummy")
            then: writer.toString() == "dummy"
        }
    
        def "writes new line"() {
            when: context.write("a").newLine().write("b")
            then: writer.toString() == "a${SystemProperties.instance.getLineSeparator()}b"
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Aug 28 11:40:18 UTC 2023
    - 2K bytes
    - Viewed (0)
Back to top