refactor: refactor Jenkins struct by removing unused methods

- Remove the parseResponse method from the Jenkins struct

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2025-12-01 17:29:58 +08:00
parent cc67514a1a
commit afbea8106e
-15
View File
@@ -68,21 +68,6 @@ func (jenkins *Jenkins) sendRequest(req *http.Request) (*http.Response, error) {
return jenkins.Client.Do(req)
}
func (jenkins *Jenkins) parseResponse(resp *http.Response, body interface{}) (err error) {
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
if err != nil {
return
}
if body == nil {
return
}
return json.Unmarshal(data, body)
}
func (jenkins *Jenkins) post(path string, params url.Values, body interface{}) (err error) {
requestURL := jenkins.buildURL(path, params)