Exemple #1
0
// ExampleHelloWord shows how to call HelloWorld()
func ExampleHelloWorld() {
	fmt.Println(hw.HelloWorld("as an example"))
	// Output: Hello World as an example
}
Exemple #2
0
func TestHelloWorld(t *testing.T) {
	thw := hw.HelloWorld("as a test")
	if thw != "Hello World as a test" {
		t.Fatalf("Wrong HelloWorld: '%s'", thw)
	}
}
Exemple #3
0
// HelloWord main
func main() {
	fmt.Println(hw.HelloWorld("in go"))
}