linodego icon indicating copy to clipboard operation
linodego copied to clipboard

[Bug]: possible memory leak when no transport is specified

Open guilhem opened this issue 7 months ago • 2 comments

go Version

1.23

API Wrapper Version

v1.46.0

Code Snippet


Expected Behavior

No memory leak 😅

Actual Behavior

Image

Steps to Reproduce

call multiple times

linodego.NewClient(&http.Client{})

guilhem avatar May 23 '25 10:05 guilhem

Cause is resty. When no transport is provided, it doesn't use DefaultTransport but create it own: https://github.com/go-resty/resty/blob/2b771ba9876863c8de9c28c6811584529d51caaf/transport.go#L17

guilhem avatar May 23 '25 10:05 guilhem

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Jun 23 '25 00:06 github-actions[bot]