MCPcopy Create free account
hub / github.com/tdewolff/minify / ExampleM_Reader

Function ExampleM_Reader

minify_test.go:382–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

380}
381
382func ExampleM_Reader() {
383 b := bytes.NewReader([]byte("input"))
384
385 m := New()
386 // add minfiers
387
388 r := m.Reader("mime/type", b)
389 if _, err := io.Copy(os.Stdout, r); err != nil {
390 if _, err := io.Copy(os.Stdout, b); err != nil {
391 panic(err)
392 }
393 }
394}
395
396func ExampleM_Writer() {
397 m := New()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
ReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…