html

package
v0.0.0-...-63c3a42 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchmarkedHandler

func BenchmarkedHandler(handler func(io.Writer,
	*http.Request)) func(http.ResponseWriter, *http.Request)

func HandleFunc

func HandleFunc(pattern string,
	handler func(w http.ResponseWriter, req *http.Request))

func RegisterHtmlWriterForPattern

func RegisterHtmlWriterForPattern(pattern, title string,
	htmlWriter HtmlWriter)

func ServeMuxHandleFunc

func ServeMuxHandleFunc(serveMux *http.ServeMux, pattern string,
	handler func(w http.ResponseWriter, req *http.Request))

func SetSecurityHeaders

func SetSecurityHeaders(w http.ResponseWriter)

func WriteFooter

func WriteFooter(writer io.Writer)

func WriteHeader

func WriteHeader(writer io.Writer)

func WriteHeaderNoGC

func WriteHeaderNoGC(writer io.Writer)

func WriteHeaderWithRequest

func WriteHeaderWithRequest(writer io.Writer, req *http.Request)

func WriteHeaderWithRequestNoGC

func WriteHeaderWithRequestNoGC(writer io.Writer, req *http.Request)

Types

type HtmlWriter

type HtmlWriter interface {
	WriteHtml(writer io.Writer)
}

type TableWriter

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

func NewTableWriter

func NewTableWriter(writer io.Writer, doHighlighting bool,
	columns ...string) (*TableWriter, error)

func (*TableWriter) CloseRow

func (tw *TableWriter) CloseRow() error

func (*TableWriter) OpenRow

func (tw *TableWriter) OpenRow(foreground, background string) error

func (*TableWriter) WriteData

func (tw *TableWriter) WriteData(foreground, data string) error

func (*TableWriter) WriteRow

func (tw *TableWriter) WriteRow(foreground, background string,
	columns ...string) error

Jump to

Keyboard shortcuts

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