- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 43 for 2014 (0.03 sec)
-
src/mime/multipart/example_test.go
// Copyright 2014 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 multipart_test import ( "fmt" "io" "log" "mime" "mime/multipart" "net/mail" "strings" ) func ExampleNewReader() { msg := &mail.Message{ Header: map[string][]string{ "Content-Type": {"multipart/mixed; boundary=foo"}, },
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 1.1K bytes - Viewed (0) -
src/crypto/md5/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 md5_test import ( "crypto/md5" "fmt" "io" "log" "os" ) func ExampleNew() { h := md5.New() io.WriteString(h, "The fog is getting thicker!") io.WriteString(h, "And Leon's getting laaarger!") fmt.Printf("%x", h.Sum(nil))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 19 17:29:19 UTC 2016 - 825 bytes - Viewed (0) -
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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 27 00:22:03 UTC 2016 - 2K bytes - Viewed (0) -
src/net/smtp/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 smtp_test import ( "fmt" "log" "net/smtp" ) func Example() { // Connect to the remote SMTP server. c, err := smtp.Dial("mail.example.com:25") if err != nil { log.Fatal(err) } // Set the sender and recipient first
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 07 22:23:10 UTC 2015 - 1.9K bytes - Viewed (0) -
src/sort/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 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
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/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) -
src/crypto/x509/example_test.go
// Copyright 2014 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 x509_test import ( "crypto/dsa" "crypto/ecdsa" "crypto/ed25519" "crypto/rsa" "crypto/x509" "encoding/pem" "fmt" ) func ExampleCertificate_Verify() { // Verifying with a custom list of root certificates. const rootPEM = `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 29 16:52:01 UTC 2019 - 5.3K bytes - Viewed (0) -
src/crypto/tls/example_test.go
// Copyright 2014 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 tls_test import ( "crypto/tls" "crypto/x509" "log" "net/http" "net/http/httptest" "os" "time" ) // zeroSource is an io.Reader that returns an unlimited number of zero bytes. type zeroSource struct{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 27 18:23:49 UTC 2024 - 7.8K bytes - Viewed (0)