- Sort Score
- Result 10 results
- Languages All
Results 41 - 47 of 47 for 2014 (0.02 sec)
-
src/text/template/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 template_test import ( "log" "os" "strings" "text/template" ) func ExampleTemplate() { // Define a template. const letter = ` Dear {{.Name}}, {{if .Attended}} It was a pleasure to see you at the wedding. {{- else}}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 29 00:17:40 UTC 2015 - 2.4K bytes - Viewed (0) -
src/math/big/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 big_test import ( "fmt" "log" "math" "math/big" ) func ExampleRat_SetString() { r := new(big.Rat) r.SetString("355/113") fmt.Println(r.FloatString(3)) // Output: 3.142 } func ExampleInt_SetString() { i := new(big.Int)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 26 16:15:32 UTC 2020 - 4K bytes - Viewed (0) -
src/math/rand/v2/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/v2" "os" "strings" "text/tabwriter" "time" ) // 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() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 30 17:09:26 UTC 2023 - 4.4K bytes - Viewed (0) -
src/go/ast/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 ast_test import ( "fmt" "go/ast" "go/format" "go/parser" "go/token" "strings" ) // This example demonstrates how to inspect the AST of a Go program. func ExampleInspect() { // src is the input for which we want to inspect the AST. src := ` package p
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/encoding/json/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 json_test import ( "bytes" "encoding/json" "fmt" "io" "log" "os" "strings" ) func ExampleMarshal() { type ColorGroup struct { ID int Name string Colors []string } group := ColorGroup{ ID: 1, Name: "Reds",
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/net/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 net_test import ( "context" "fmt" "io" "log" "net" "time" ) func ExampleListener() { // Listen on TCP port 2000 on all available unicast and // anycast IP addresses of the local system. l, err := net.Listen("tcp", ":2000") if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 13 16:36:59 UTC 2021 - 8.5K bytes - Viewed (0) -
src/go/types/example_test.go
// Copyright 2015 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. // Only run where builders (build.golang.org) have // access to compiled packages for import. // //go:build !android && !ios && !js && !wasip1 package types_test // This file shows examples of basic usage of the go/types API. // // To locate a Go package, use (*go/build.Context).Import.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.9K bytes - Viewed (0)