Skip to content

Commit 597be31

Browse files
committed
fix lint
1 parent bfe57d5 commit 597be31

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pulsaradmin/pkg/rest/client.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ func (c *Client) newRequest(method, path string) (*request, error) {
6767
return req, nil
6868
}
6969

70-
func (c *Client) newRequestWithURL(method string, urlOpt *url.URL) (*request, error) {
70+
func (c *Client) newRequestWithURL(method string, urlOpt *url.URL) *request {
7171
req := &request{
7272
method: method,
7373
url: urlOpt,
7474
params: make(url.Values),
7575
}
76-
return req, nil
76+
return req
7777
}
7878

7979
func (c *Client) doRequest(r *request) (*http.Response, error) {
@@ -114,10 +114,7 @@ func (c *Client) MakeRequest(method, endpoint string) (*http.Response, error) {
114114
}
115115

116116
func (c *Client) MakeRequestWithURL(method string, urlOpt *url.URL) (*http.Response, error) {
117-
req, err := c.newRequestWithURL(method, urlOpt)
118-
if err != nil {
119-
return nil, err
120-
}
117+
req := c.newRequestWithURL(method, urlOpt)
121118

122119
resp, err := checkSuccessful(c.doRequest(req))
123120
if err != nil {

0 commit comments

Comments
 (0)