From 2ac4f74b369b1baec2033e299de45e58acb2bc1f Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 20 Sep 2023 12:37:11 +0000 Subject: [PATCH] add logs (#3) Co-authored-by: oliverpool Co-committed-by: oliverpool --- main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index db535e3..96315cb 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ package main import ( "errors" "fmt" + "log" "strconv" "github.com/ovh/go-ovh/ovh" @@ -49,11 +50,18 @@ func run(action *githubactions.Action) error { if err != nil { return err } - return client.Put(uri, struct { + log.Println("OVH Client created") + + err = client.Put(uri, struct { SubDomain string `json:"subDomain"` Target string `json:"target"` }{ SubDomain: subDomain, Target: strconv.Quote(value), }, nil) + if err != nil { + return err + } + log.Println("DNS record updated") + return nil }