mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-20 01:47:58 +00:00
refactor: clean code
This commit is contained in:
@@ -14,9 +14,9 @@ type Client struct {
|
||||
client *resty.Client
|
||||
}
|
||||
|
||||
func NewClient(apiHost, apiToken string) *Client {
|
||||
func NewClient(serverUrl, apiToken string) *Client {
|
||||
client := resty.New().
|
||||
SetBaseURL(strings.TrimRight(apiHost, "/")).
|
||||
SetBaseURL(strings.TrimRight(serverUrl, "/")).
|
||||
SetHeader("X-SLCE-API-TOKEN", apiToken)
|
||||
|
||||
return &Client{
|
||||
|
Reference in New Issue
Block a user