From af69de28cf6329ed6e33054091e476f9dd4a8c6d Mon Sep 17 00:00:00 2001 From: SoXX Date: Mon, 23 Oct 2023 13:29:39 +0200 Subject: [PATCH] refactor: moved http.Client to model.RequestContext Signed-off-by: SoXX --- example/lowlevel/pool.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/example/lowlevel/pool.go b/example/lowlevel/pool.go index 1f7aa70..da7db07 100644 --- a/example/lowlevel/pool.go +++ b/example/lowlevel/pool.go @@ -22,14 +22,11 @@ func main() { // Log: Getting a single pool. log.Println("Getting single pool: ") - // Initialize an http.Client. - client := http.Client{} - // Specify the pool ID for retrieval. poolID := "36957" // Replace with the desired pool's ID. // Call the GetPool function to retrieve the specified pool. - pool, err := endpoints.GetPool(client, requestContext, poolID) + pool, err := endpoints.GetPool(requestContext, poolID) if err != nil { log.Println(err) @@ -48,7 +45,7 @@ func main() { } // Call the GetPools function to retrieve a list of pools based on the query parameters. - pools, err := endpoints.GetPools(client, requestContext, query) + pools, err := endpoints.GetPools(requestContext, query) if err != nil { log.Println(err)