Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for testdata (3.31 sec)

  1. src/archive/zip/example_test.go

    		}
    	}
    
    	// Make sure to check the error on Close.
    	err := w.Close()
    	if err != nil {
    		log.Fatal(err)
    	}
    }
    
    func ExampleReader() {
    	// Open a zip archive for reading.
    	r, err := zip.OpenReader("testdata/readme.zip")
    	if err != nil {
    		log.Fatal(err)
    	}
    	defer r.Close()
    
    	// Iterate through the files in the archive,
    	// printing some of their contents.
    	for _, f := range r.File {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  2. doc/go1.17_spec.html

    If the iteration variables are declared outside the "for" statement,
    after execution their values will be those of the last iteration.
    </p>
    
    <pre>
    var testdata *struct {
    	a *[7]int
    }
    for i, _ := range testdata.a {
    	// testdata.a is never evaluated; len(testdata.a) is constant
    	// i ranges from 0 to 6
    	f(i)
    }
    
    var a [10]string
    for i, s := range a {
    	// type of i is int
    	// type of s is string
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/pseudo_test.go

    		{"PCDATA", "1", "expect two operands for PCDATA"},
    	}
    
    	runtimeTests := []errtest{
    		{"TEXT", "foo<ABIInternal>(SB),0", "TEXT \"foo\": ABIInternal requires NOSPLIT"},
    	}
    
    	testcats := []struct {
    		allowABI bool
    		tests    []errtest
    	}{
    		{
    			allowABI: false,
    			tests:    nonRuntimeTests,
    		},
    		{
    			allowABI: true,
    			tests:    runtimeTests,
    		},
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. src/bufio/bufio_test.go

    	}
    }
    
    func TestReadAfterLines(t *testing.T) {
    	line1 := "this is line1"
    	restData := "this is line2\nthis is line 3\n"
    	inbuf := bytes.NewReader([]byte(line1 + "\n" + restData))
    	outbuf := new(strings.Builder)
    	maxLineLength := len(line1) + len(restData)/2
    	l := NewReaderSize(inbuf, maxLineLength)
    	line, isPrefix, err := l.ReadLine()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  5. misc/ios/go_ios_exec.go

    	if err != nil {
    		return err
    	}
    	defer d.Close()
    	fi, err := d.Readdir(-1)
    	if err != nil {
    		return err
    	}
    
    	for _, f := range fi {
    		if f.IsDir() {
    			if f.Name() == "testdata" {
    				if err := cp(dst, filepath.Join(src, f.Name())); err != nil {
    					return err
    				}
    			}
    			continue
    		}
    		if err := cp(dst, filepath.Join(src, f.Name())); err != nil {
    			return err
    		}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 23.4K bytes
    - Viewed (0)
  6. doc/go_spec.html

    as in an <a href="#Assignment_statements">assignment statement</a>.
    </p>
    
    <pre>
    var testdata *struct {
    	a *[7]int
    }
    for i, _ := range testdata.a {
    	// testdata.a is never evaluated; len(testdata.a) is constant
    	// i ranges from 0 to 6
    	f(i)
    }
    
    var a [10]string
    for i, s := range a {
    	// type of i is int
    	// type of s is string
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Thu May 02 22:43:51 GMT 2024
    - 279.6K bytes
    - Viewed (0)
Back to top