Sha256: 5ebebbd6e078193fd142977f836471a52c7a3c380eebde2b94cc2cc958509d52

Contents?: true

Size: 766 Bytes

Versions: 117

Compression:

Stored size: 766 Bytes

Contents

package greeting

import "fmt"

// ExampleHelloWorld() is an Example function. Examples are testable snippets of
// Go code that are used for documenting, and verifying, the package API.
// They may be present in some exercises to demonstrate the expected use of the
// exercise API and can be run as part of a package's test suite
//
// When an Example test is run the data that is written to standard output is
// compared to the data that comes after the "Output: " comment.
//
// So, below, the result of HelloWorld() is passed to standard output
// using fmt.Println, and this is compared against the expected output; Hello, World!
// If they are equal, the test passes.
func ExampleHelloWorld() {
	h := HelloWorld()
	fmt.Println(h)
	// Output: Hello, World!
}

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
trackler-2.2.1.14 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.13 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.12 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.11 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.10 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.9 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.8 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.7 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.6 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.5 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.4 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.3 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.2 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.1 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.1.0 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.0.6 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.0.5 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.0.4 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.0.3 tracks/go/exercises/hello-world/example_helloworld_test.go
trackler-2.2.0.2 tracks/go/exercises/hello-world/example_helloworld_test.go