Documentation ¶
Index ¶
- func Close(cc ...io.Closer)
- func CloseAny(cc ...interface{})
- func DiscardClose(c io.ReadCloser)
- func ReadBytes(r io.Reader) []byte
- func ReadString(r io.Reader) string
- type BufioWriteCloser
- type MaxLatencyWriter
- type WriteFlusher
- type WriteTempFileOption
- type WriteTempFileOptionFn
- type WriteTempFileResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscardClose ¶
func DiscardClose(c io.ReadCloser)
DiscardClose discards the reader and then close it.
func ReadString ¶
Types ¶
type BufioWriteCloser ¶
func NewBufioWriteCloser ¶
func NewBufioWriteCloser(w io.WriteCloser) *BufioWriteCloser
func (*BufioWriteCloser) Close ¶
func (b *BufioWriteCloser) Close() error
type MaxLatencyWriter ¶
type MaxLatencyWriter struct { Dst WriteFlusher Latency time.Duration // non-zero; negative means to flush immediately // contains filtered or unexported fields }
func (*MaxLatencyWriter) Stop ¶
func (m *MaxLatencyWriter) Stop()
type WriteFlusher ¶
type WriteTempFileOption ¶
type WriteTempFileOptionFn ¶
type WriteTempFileOptionFn func(*WriteTempFileOption)
func PanicOnError ¶
func PanicOnError(c bool) WriteTempFileOptionFn
func WithTempContent ¶
func WithTempContent(c []byte) WriteTempFileOptionFn
func WithTempDir ¶
func WithTempDir(c string) WriteTempFileOptionFn
func WithTempPattern ¶
func WithTempPattern(c string) WriteTempFileOptionFn
func WithTempString ¶
func WithTempString(c string) WriteTempFileOptionFn
type WriteTempFileResult ¶
func WriteTempFile ¶
func WriteTempFile(fns ...WriteTempFileOptionFn) *WriteTempFileResult
WriteTempFile writes the content to a temporary file.
Click to show internal directories.
Click to hide internal directories.