Files
services/examples/location/read/go/getLocationById.go
2021-09-16 12:52:36 +01:00

17 lines
319 B
Go
Executable File

package example
import (
"fmt"
"github.com/micro/services/clients/go/location"
"os"
)
// Read an entity by its ID
func GetLocationById() {
locationService := location.NewLocationService(os.Getenv("MICRO_API_TOKEN"))
rsp, err := locationService.Read(&location.ReadRequest{
Id: "1",
})
fmt.Println(rsp, err)
}