flushwriter

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type W

type W struct {
	// contains filtered or unexported fields
}

W is a Writer that flushes whenever write happens. This is used to avoid buffering in http.ResponseWriter.

The copy is copied from https://stackoverflow.com/questions/19292113/not-buffered-http-responsewritter-in-golang

func New

func New(w io.Writer) *W

New returns a new W.

func (*W) Write

func (fw *W) Write(p []byte) (n int, err error)

Write writes and flushes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL