refactor: clean code

This commit is contained in:
Fu Diwei
2025-05-25 23:32:41 +08:00
parent b798b824db
commit 0909671be6
28 changed files with 81 additions and 92 deletions

View File

@@ -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{