From 4294756ea5e874a8d7020567aac47a1b95160802 Mon Sep 17 00:00:00 2001 From: aviau Date: Sun, 15 Sep 2024 12:29:15 -0400 Subject: [PATCH] README: update basic usage example --- README.md | 6 +++--- examples/{get-leaksdb-sources => basic-usage}/main.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) rename examples/{get-leaksdb-sources => basic-usage}/main.go (71%) diff --git a/README.md b/README.md index 6a7eaef..709cbeb 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,15 @@ func main() { os.Getenv("FLARE_API_KEY"), ) resp, err := client.Get( - "/leaksdb/v2/sources", nil, + "/tokens/test", nil, ) if err != nil { - fmt.Printf("failed to get sources: %s\n", err) + fmt.Printf("failed to test token: %s\n", err) os.Exit(1) } defer resp.Body.Close() if _, err := io.Copy(os.Stdout, resp.Body); err != nil { - fmt.Printf("failed to print sources: %s\n", err) + fmt.Printf("failed to print response: %s\n", err) os.Exit(1) } } diff --git a/examples/get-leaksdb-sources/main.go b/examples/basic-usage/main.go similarity index 71% rename from examples/get-leaksdb-sources/main.go rename to examples/basic-usage/main.go index 7b2d015..6e9cfcf 100644 --- a/examples/get-leaksdb-sources/main.go +++ b/examples/basic-usage/main.go @@ -13,15 +13,15 @@ func main() { os.Getenv("FLARE_API_KEY"), ) resp, err := client.Get( - "/leaksdb/v2/sources", nil, + "/tokens/test", nil, ) if err != nil { - fmt.Printf("failed to get sources: %s\n", err) + fmt.Printf("failed to test token: %s\n", err) os.Exit(1) } defer resp.Body.Close() if _, err := io.Copy(os.Stdout, resp.Body); err != nil { - fmt.Printf("failed to print sources: %s\n", err) + fmt.Printf("failed to print response: %s\n", err) os.Exit(1) } }