app-services-cli icon indicating copy to clipboard operation
app-services-cli copied to clipboard

Remove http response bodies where not required

Open rkpattnaik780 opened this issue 3 years ago • 2 comments

Description

Some commands while making api request use the http.Response object even if it is not required. This increases the lines of code and might result in unseen lint errors.

rkpattnaik780 avatar Apr 20 '22 13:04 rkpattnaik780

After quick research it looks like from 1.18.0 linting capabilities are much better - they can detect return types from underlying library structures. This means that to enable 1.18.0 we can:

  1. Disable that specific rule across CLI and remove any defer statements
  2. Add defer body.close everywhere even if it is pointless

Option 1 seems much desired.

wtrocki avatar Apr 20 '22 13:04 wtrocki

Will vote for 1 too.

rkpattnaik780 avatar Apr 20 '22 14:04 rkpattnaik780

Fixed

jackdelahunt avatar Apr 03 '23 11:04 jackdelahunt