Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ExampleNewReader (0.31 sec)

  1. src/compress/zlib/example_test.go

    	w := zlib.NewWriter(&b)
    	w.Write([]byte("hello, world\n"))
    	w.Close()
    	fmt.Println(b.Bytes())
    	// Output: [120 156 202 72 205 201 201 215 81 40 207 47 202 73 225 2 4 0 0 255 255 33 231 4 147]
    }
    
    func ExampleNewReader() {
    	buff := []byte{120, 156, 202, 72, 205, 201, 201, 215, 81, 40, 207,
    		47, 202, 73, 225, 2, 4, 0, 0, 255, 255, 33, 231, 4, 147}
    	b := bytes.NewReader(buff)
    
    	r, err := zlib.NewReader(b)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 784 bytes
    - Viewed (0)
  2. src/mime/multipart/example_test.go

    // license that can be found in the LICENSE file.
    
    package multipart_test
    
    import (
    	"fmt"
    	"io"
    	"log"
    	"mime"
    	"mime/multipart"
    	"net/mail"
    	"strings"
    )
    
    func ExampleNewReader() {
    	msg := &mail.Message{
    		Header: map[string][]string{
    			"Content-Type": {"multipart/mixed; boundary=foo"},
    		},
    		Body: strings.NewReader(
    			"--foo\r\nFoo: one\r\n\r\nA section\r\n" +
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  3. src/mime/quotedprintable/example_test.go

    // license that can be found in the LICENSE file.
    
    package quotedprintable_test
    
    import (
    	"fmt"
    	"io"
    	"mime/quotedprintable"
    	"os"
    	"strings"
    )
    
    func ExampleNewReader() {
    	for _, s := range []string{
    		`=48=65=6C=6C=6F=2C=20=47=6F=70=68=65=72=73=21`,
    		`invalid escape: <b style="font-size: 200%">hello</b>`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 1K bytes
    - Viewed (0)
Back to top