Skip to content

Instantly share code, notes, and snippets.

@ilmiawan
Last active January 2, 2021 05:01
Show Gist options
  • Save ilmiawan/21a78bf816be0de7c72fea6c73a33c25 to your computer and use it in GitHub Desktop.
Save ilmiawan/21a78bf816be0de7c72fea6c73a33c25 to your computer and use it in GitHub Desktop.
package main
func main() {
userClient := NewClient(httpClient, "http://userservice")
userSvc := NewService(userClient)
user, err := GetUserDetailsByUserID(1)
if err != nil {
logrus.Errorf("[ERROR] failed fetching user details: %v", err)
}
fmt.Println("Hallo %s!", user.Name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment