Files
services/examples/helloworld/call/go/callTheHelloworldService.go
2021-09-16 12:52:36 +01:00

17 lines
371 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/helloworld"
"os"
)
// Call returns a personalised "Hello $name" response
func CallTheHelloworldService() {
helloworldService := helloworld.NewHelloworldService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := helloworldService.Call(&helloworld.CallRequest{
Name: "John",
})
fmt.Println(rsp, err)
}