- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 5,349 for fmtX (0.05 sec)
-
src/path/example_test.go
fmt.Println(path.Join("a", "b", "c")) fmt.Println(path.Join("a", "b/c")) fmt.Println(path.Join("a/b", "c")) fmt.Println(path.Join("a/b", "../../../xyz")) fmt.Println(path.Join("", "")) fmt.Println(path.Join("a", "")) fmt.Println(path.Join("", "a")) // Output: // a/b/c // a/b/c // a/b/c // ../xyz // // a // a } func ExampleMatch() { fmt.Println(path.Match("abc", "abc"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 19 00:10:22 UTC 2020 - 2.2K bytes - Viewed (0) -
src/time/example_test.go
// The package also accepts the incorrect but common prefix u for micro. micro2, _ := time.ParseDuration("1us") fmt.Println(hours) fmt.Println(complex) fmt.Printf("There are %.0f seconds in %v.\n", complex.Seconds(), complex) fmt.Printf("There are %d nanoseconds in %v.\n", micro.Nanoseconds(), micro) fmt.Printf("There are %6.2e seconds in %v.\n", micro2.Seconds(), micro2) // Output: // 10h0m0s // 1h10m10s
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 13 01:05:00 UTC 2024 - 22.4K bytes - Viewed (0) -
test/fixedbugs/issue4909b.go
package main import "fmt" // We are going to define 256 types T(n), // such that T(n) embeds T(2n) and *T(2n+1). func main() { fmt.Printf("// errorcheck\n\n") fmt.Printf("package p\n\n") fmt.Println(`import "unsafe"`) // Dump types. for n := 1; n < 256; n++ { writeStruct(n) } // Dump leaves for n := 256; n < 512; n++ { fmt.Printf("type T%d int\n", n) } fmt.Printf("var t T1\n")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 19 06:26:35 UTC 2021 - 1.3K bytes - Viewed (0) -
src/cmd/gofmt/testdata/import.input
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 28 23:33:26 UTC 2019 - 2.1K bytes - Viewed (0) -
src/cmd/covdata/dump.go
fmt.Fprintf(os.Stderr, " \tmerges data from input directories dir1+dir2\n") fmt.Fprintf(os.Stderr, " \tand emits percentage of statements covered\n\n") case funcMode: fmt.Fprintf(os.Stderr, " go tool covdata func -i=dir1,dir2\n\n") fmt.Fprintf(os.Stderr, " \treads coverage data files from dir1+dirs2\n") fmt.Fprintf(os.Stderr, " \tand writes out coverage profile data for\n") fmt.Fprintf(os.Stderr, " \teach function.\n")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 11:36:57 UTC 2023 - 11.2K bytes - Viewed (0) -
src/encoding/json/example_test.go
if err != nil { log.Fatal(err) } fmt.Printf("%v: %v\n", m.Name, m.Text) } // read closing bracket t, err = dec.Token() if err != nil { log.Fatal(err) } fmt.Printf("%T: %v\n", t, t) // Output: // json.Delim: [ // Ed: Knock knock. // Sam: Who's there? // Ed: Go fmt. // Sam: Go fmt who? // Ed: Go fmt yourself! // json.Delim: ] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 6.1K bytes - Viewed (0) -
src/math/big/example_test.go
// the fmt package recognizes it as an implementation of fmt.Scanner. i := new(big.Int) _, err := fmt.Sscan("18446744073709551617", i) if err != nil { log.Println("error scanning value:", err) } else { fmt.Println(i) } // Output: 18446744073709551617 } func ExampleFloat_Scan() { // The Scan function is rarely used directly; // the fmt package recognizes it as an implementation of fmt.Scanner.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 26 16:15:32 UTC 2020 - 4K bytes - Viewed (0) -
src/sort/example_test.go
package sort_test import ( "fmt" "math" "sort" ) func ExampleInts() { s := []int{5, 2, 6, 3, 1, 4} // unsorted sort.Ints(s) fmt.Println(s) // Output: [1 2 3 4 5 6] } func ExampleIntsAreSorted() { s := []int{1, 2, 3, 4, 5, 6} // sorted ascending fmt.Println(sort.IntsAreSorted(s)) s = []int{6, 5, 4, 3, 2, 1} // sorted descending fmt.Println(sort.IntsAreSorted(s))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:29 UTC 2017 - 2.8K bytes - Viewed (0) -
src/net/http/cgi/cgi_main.go
panic(err) } params := req.Form if params.Get("loc") != "" { fmt.Printf("Location: %s\r\n\r\n", params.Get("loc")) return } fmt.Printf("Content-Type: text/html\r\n") fmt.Printf("X-CGI-Pid: %d\r\n", os.Getpid()) fmt.Printf("X-Test-Header: X-Test-Value\r\n") fmt.Printf("\r\n") if params.Get("writestderr") != "" { fmt.Fprintf(os.Stderr, "Hello, stderr!\n") } if params.Get("bigresponse") != "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.1K bytes - Viewed (0) -
test/typeparam/mapsimp.dir/main.go
} } func TestEqual() { if !a.Equal(m1, m1) { panic(fmt.Sprintf("a.Equal(%v, %v) = false, want true", m1, m1)) } if a.Equal(m1, nil) { panic(fmt.Sprintf("a.Equal(%v, nil) = true, want false", m1)) } if a.Equal(nil, m1) { panic(fmt.Sprintf("a.Equal(nil, %v) = true, want false", m1)) } if !a.Equal[int, int](nil, nil) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 3.6K bytes - Viewed (0)