Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Ball (0.14 sec)

  1. src/archive/tar/example_test.go

    // Copyright 2013 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package tar_test
    
    import (
    	"archive/tar"
    	"bytes"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func Example_minimal() {
    	// Create and add some files to the archive.
    	var buf bytes.Buffer
    	tw := tar.NewWriter(&buf)
    	var files = []struct {
    		Name, Body string
    	}{
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 16 16:54:08 GMT 2017
    - 1.4K bytes
    - Viewed (0)
  2. src/archive/zip/example_test.go

    // Copyright 2012 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package zip_test
    
    import (
    	"archive/zip"
    	"bytes"
    	"compress/flate"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func ExampleWriter() {
    	// Create a buffer to write our archive to.
    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  3. src/bufio/example_test.go

    		fmt.Println(scanner.Text()) // Println will add back the final '\n'
    	}
    	if err := scanner.Err(); err != nil {
    		fmt.Fprintln(os.Stderr, "reading standard input:", err)
    	}
    }
    
    // Return the most recent call to Scan as a []byte.
    func ExampleScanner_Bytes() {
    	scanner := bufio.NewScanner(strings.NewReader("gopher"))
    	for scanner.Scan() {
    		fmt.Println(len(scanner.Bytes()) == 6)
    	}
    	if err := scanner.Err(); err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  4. src/bytes/example_test.go

    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package bytes_test
    
    import (
    	"bytes"
    	"encoding/base64"
    	"fmt"
    	"io"
    	"os"
    	"sort"
    	"strconv"
    	"unicode"
    )
    
    func ExampleBuffer() {
    	var b bytes.Buffer // A Buffer needs no initialization.
    	b.Write([]byte("Hello "))
    	fmt.Fprintf(&b, "world!")
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top