Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Leider (0.16 sec)

  1. src/archive/tar/example_test.go

    	}{
    		{"readme.txt", "This archive contains some text files."},
    		{"gopher.txt", "Gopher names:\nGeorge\nGeoffrey\nGonzo"},
    		{"todo.txt", "Get animal handling license."},
    	}
    	for _, file := range files {
    		hdr := &tar.Header{
    			Name: file.Name,
    			Mode: 0600,
    			Size: int64(len(file.Body)),
    		}
    		if err := tw.WriteHeader(hdr); err != nil {
    			log.Fatal(err)
    		}
    		if _, err := tw.Write([]byte(file.Body)); err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Nov 16 16:54:08 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  2. src/bytes/example_test.go

    	var b bytes.Buffer // A Buffer needs no initialization.
    	b.Write([]byte("Hello "))
    	fmt.Fprintf(&b, "world!")
    	b.WriteTo(os.Stdout)
    	// Output: Hello world!
    }
    
    func ExampleBuffer_reader() {
    	// A Buffer can turn a string or a []byte into an io.Reader.
    	buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==")
    	dec := base64.NewDecoder(base64.StdEncoding, buf)
    	io.Copy(os.Stdout, dec)
    	// Output: Gophers rule!
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top