Skip to content

Commit

Permalink
changed debug stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Jan 31, 2023
1 parent ed82e1b commit 0e38737
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions haivision/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit 0e38737

Please sign in to comment.