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