()
| 585 | } |
| 586 | |
| 587 | func 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 | |
| 600 | func ExampleMinify_writer() { |
| 601 | m := minify.New() |