From 0e38737c6b18be6a3edb3a8503576702e54936a5 Mon Sep 17 00:00:00 2001 From: Allan Nava Date: Tue, 31 Jan 2023 12:49:30 +0100 Subject: [PATCH] changed debug stuff --- haivision/builder.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/haivision/builder.go b/haivision/builder.go index 31ffd94..3af9301 100644 --- a/haivision/builder.go +++ b/haivision/builder.go @@ -15,6 +15,12 @@ func BuildHaivision(url string, debug bool, username string, password string, he Url: url, restClient: resty.New(), } + // + if debug { + haivisionClient.restClient.SetDebug(true) + haivisionClient.debug = true + log.Println("Debug mode is enabled for the haivision client ") + } // You can override all below settings and options at request level if you want to //-------------------------------------------------------------------------------- // Host URL for all request. So you can use relative URL in the request @@ -39,12 +45,6 @@ func BuildHaivision(url string, debug bool, username string, password string, he haivisionClient.restClient.SetHeader(h, v) } } - // - if debug { - haivisionClient.restClient.SetDebug(true) - haivisionClient.debug = true - log.Println("Debug mode is enabled for the haivision client ") - } return haivisionClient, nil }