MCPcopy Index your code
hub / github.com/tdewolff/minify / ExampleMinify_reader

Function ExampleMinify_reader

html/html_test.go:587–598  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

585}
586
587func ExampleMinify_reader() {
588 b := bytes.NewReader([]byte("<html><body><h1>Example</h1></body></html>"))
589
590 m := minify.New()
591 m.Add("text/html", &Minifier{})
592
593 r := m.Reader("text/html", b)
594 if _, err := io.Copy(os.Stdout, r); err != nil {
595 panic(err)
596 }
597 // Output: <h1>Example</h1>
598}
599
600func ExampleMinify_writer() {
601 m := minify.New()

Callers

nothing calls this directly

Calls 2

AddMethod · 0.80
ReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…