Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter dislikes unclosed body #273

Open
rainest opened this issue Feb 2, 2023 · 1 comment
Open

Linter dislikes unclosed body #273

rainest opened this issue Feb 2, 2023 · 1 comment

Comments

@rainest
Copy link
Contributor

rainest commented Feb 2, 2023

https://github.com/Kong/go-kong/blame/e7e15d83eeebe60fdeb85ea1be93df17c7cdc3bf/kong/client.go#L241 makes https://github.com/timakin/bodyclose unhappy because we do indeed not close the body. It apparently did not care about this last year.

We're doing weird things where we never technically read, but do copy the body, and absent any obvious failure (none has appeared in the year since this was added) I'm deferring this as a chore til later.

@rainest
Copy link
Contributor Author

rainest commented Feb 2, 2023

Attempting to close the body as one normally would causes all sorts of fun: #271 (comment)

We need to untangle something with how the copy/decode after works, as it's apparently currently destroying the body and making it impossible to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant