From 98b9e49e8912dd2bc008cd675a9988e7dc612f31 Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:20:22 +0200 Subject: [PATCH 1/2] docs: fix newlines --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1341e84..725a7a6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,8 +13,8 @@ Currently only supports maintaining DNS zones and records. -> You can configure the provider via environment variables `HOSTINGDE_*` **Environment variables for provider configuration** -Required: `HOSTINGDE_AUTH_TOKEN`, go to your [hosting.de profile](https://secure.hosting.de/profile) and create an API Key -Optional: `HOSTINGDE_ACCOUNT_ID` +- Required: `HOSTINGDE_AUTH_TOKEN`, go to your [hosting.de profile](https://secure.hosting.de/profile) and create an API Key (token) +- Optional: `HOSTINGDE_ACCOUNT_ID` Before continuing, make sure you have created an API token with DNS permissions and allow-listed your [external IP address](https://wieistmeineip.de/). From 3a3bc8a0bc03716951efcab6b1e9f15fc5345a81 Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Thu, 27 Apr 2023 04:20:44 +0200 Subject: [PATCH 2/2] chore: make PHONY targets, remove debug print statement, add newline to output --- Makefile | 2 ++ hostingde/client.go | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 44821bf..2e3896a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ default: install +.PHONY: docs install lint testacc + docs: go generate ./... diff --git a/hostingde/client.go b/hostingde/client.go index 26b7651..1a8a4a5 100644 --- a/hostingde/client.go +++ b/hostingde/client.go @@ -59,7 +59,6 @@ func (c *Client) doRequestIter(httpMethod string, uri string, request Request, r return nil, err } - fmt.Println(string(rawBody)) req, err := http.NewRequest(httpMethod, uri, bytes.NewReader(rawBody)) if err != nil { return nil, err @@ -123,7 +122,7 @@ func (c *Client) doRequestIter(httpMethod string, uri string, request Request, r } } if blocked { - fmt.Printf("Request blocked, triggering new request: %d", iteration) + fmt.Printf("Request blocked, triggering new request: %d\n", iteration) time.Sleep(1 * time.Second) return c.doRequestIter(httpMethod, uri, request, response, iteration) }