- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for 2014 (0.03 sec)
-
src/encoding/base32/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. // Keep in sync with ../base64/example_test.go. package base32_test import ( "encoding/base32" "fmt" "os" ) func ExampleEncoding_EncodeToString() { data := []byte("any + old & data") str := base32.StdEncoding.EncodeToString(data) fmt.Println(str) // Output:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 27 16:54:36 UTC 2021 - 1.6K bytes - Viewed (0) -
src/sync/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 sync_test import ( "fmt" "os" "sync" ) type httpPkg struct{} func (httpPkg) Get(url string) {} var http httpPkg // This example fetches several URLs concurrently, // using a WaitGroup to block until all the fetches are complete.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 23 17:45:47 UTC 2024 - 2.2K bytes - Viewed (0) -
src/os/exec/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 exec_test import ( "context" "encoding/json" "fmt" "io" "log" "os" "os/exec" "strings" "time" ) func ExampleLookPath() { path, err := exec.LookPath("fortune") if err != nil { log.Fatal("installing fortune is in your future") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 07 06:18:48 UTC 2022 - 3.5K bytes - Viewed (0) -
src/go/doc/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 doc_test import ( "bytes" "fmt" "go/ast" "go/doc" "go/format" "go/parser" "go/token" "internal/diff" "internal/txtar" "path/filepath" "reflect" "strings" "testing" ) func TestExamples(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 16:17:51 UTC 2022 - 9.6K bytes - Viewed (0) -
src/net/url/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 url_test import ( "encoding/json" "fmt" "log" "net/url" "strings" ) func ExamplePathEscape() { path := url.PathEscape("my/cool+blog&about,stuff") fmt.Println(path) // Output: // my%2Fcool+blog&about%2Cstuff }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 7.2K bytes - Viewed (0) -
src/strings/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 strings_test import ( "fmt" "strings" "unicode" "unsafe" ) func ExampleClone() { s := "abc" clone := strings.Clone(s) fmt.Println(s == clone) fmt.Println(unsafe.StringData(s) == unsafe.StringData(clone)) // Output: // true // false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 22:05:38 UTC 2023 - 10.7K bytes - Viewed (0) -
src/time/example_test.go
// Unix format: Wed Feb 25 11:06:39 PST 2015 // Same, in UTC: Wed Feb 25 19:06:39 UTC 2015 //in Shanghai with seconds: 2015-02-26T03:06:39 +080000 //in Shanghai with colon seconds: 2015-02-26T03:06:39 +08:00:00 // // Formats: // // Basic full date "Mon Jan 2 15:04:05 MST 2006" gives "Wed Feb 25 11:06:39 PST 2015" // Basic short date "2006/01/02" gives "2015/02/25"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 13 01:05:00 UTC 2024 - 22.4K bytes - Viewed (0) -
src/unicode/utf8/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 utf8_test import ( "fmt" "unicode/utf8" ) func ExampleDecodeLastRune() { b := []byte("Hello, 世界") for len(b) > 0 { r, size := utf8.DecodeLastRune(b) fmt.Printf("%c %v\n", r, size) b = b[:len(b)-size] } // Output: // 界 3 // 世 3
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 05 21:29:18 UTC 2021 - 3.6K bytes - Viewed (0) -
src/math/rand/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 rand_test import ( "fmt" "math/rand" "os" "strings" "text/tabwriter" ) // These tests serve as an example but also make sure we don't change // the output of the random number generator when given a fixed seed. func Example() { answers := []string{
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 16:24:57 UTC 2022 - 4.2K bytes - Viewed (0) -
src/reflect/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 reflect_test import ( "bytes" "encoding/json" "fmt" "io" "os" "reflect" ) func ExampleKind() { for _, v := range []any{"hi", 42, func() {}} { switch v := reflect.ValueOf(v); v.Kind() { case reflect.String: fmt.Println(v.String())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 19 20:04:36 UTC 2022 - 4.5K bytes - Viewed (0)