From 15a153c64c7dbeb3f8c52cc753652a18c1f2cd58 Mon Sep 17 00:00:00 2001 From: Abhimanyu Paldiwal Date: Fri, 6 Aug 2021 18:07:43 -0700 Subject: [PATCH] Update list.mdx --- content/api/resources/operations/list.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content/api/resources/operations/list.mdx b/content/api/resources/operations/list.mdx index 460acecc0..173864190 100644 --- a/content/api/resources/operations/list.mdx +++ b/content/api/resources/operations/list.mdx @@ -61,6 +61,29 @@ server console.error(err); }); ``` + +```go +package main + +import ( + "fmt" + "log" + + "github.com/stellar/go/clients/horizonclient" +) + +func main() { + client := horizonclient.DefaultPublicNetClient + operationRequest := horizonclient.OperationRequest {} + + resp, err := client.Operations(operationRequest) + if err != nil { + log.Fatal(err) + return + } + fmt.Println(resp) +} +```