Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for original (0.33 sec)

  1. src/net/url/example_test.go

    	q := u.Query()
    	q.Set("q", "golang")
    	u.RawQuery = q.Encode()
    	fmt.Println(u)
    	// Output: https://google.com/search?q=golang
    }
    
    func ExampleURL_roundtrip() {
    	// Parse + String preserve the original encoding.
    	u, err := url.Parse("https://example.com/foo%2fbar")
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(u.Path)
    	fmt.Println(u.RawPath)
    	fmt.Println(u.String())
    	// Output:
    	// /foo/bar
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 7.2K bytes
    - Viewed (0)
  2. src/os/example_test.go

    		// Symlink targets are relative to the directory containing the link.
    		dstAbs = filepath.Join(filepath.Dir(linkPath), dst)
    	}
    
    	// Check that the target is correct by comparing it with os.Stat
    	// on the original target path.
    	dstInfo, err := os.Stat(dstAbs)
    	if err != nil {
    		log.Fatal(err)
    	}
    	targetInfo, err := os.Stat(targetPath)
    	if err != nil {
    		log.Fatal(err)
    	}
    	if !os.SameFile(dstInfo, targetInfo) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 17:35:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. src/go/printer/example_test.go

    	// file set fset.
    	funcAST, fset := parseFunc("example_test.go", "printSelf")
    
    	// Print the function body into buffer buf.
    	// The file set is provided to the printer so that it knows
    	// about the original source formatting and can add additional
    	// line breaks where they were present in the source.
    	var buf bytes.Buffer
    	printer.Fprint(&buf, fset, funcAST.Body)
    
    	// Remove braces {} enclosing the function body, unindent,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 16 14:55:02 UTC 2022
    - 1.7K bytes
    - Viewed (0)
Back to top