mozillazg / go-cos

腾讯云对象存储服务 COS(Cloud Object Storage) Go SDK(XML API)
https://godoc.org/github.com/mozillazg/go-cos
MIT License
88 stars 26 forks source link

Close response bodies #15

Open Daanikus opened 5 years ago

Daanikus commented 5 years ago

Fix responses returned from Object methods whose bodies have not been closed. This leads to connections not being recycled.

Add CodeLingo tenet to catch this issue during code reviews.

I've fixed instances in example and test files, the Bucket struct may have similar issues which we can catch by editing the tenet. Are there other structs which may contain unclosed connections?

codecov[bot] commented 5 years ago

Codecov Report

Merging #15 into develop will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop      #15   +/-   ##
========================================
  Coverage    96.27%   96.27%           
========================================
  Files           16       16           
  Lines          805      805           
========================================
  Hits           775      775           
  Misses          16       16           
  Partials        14       14

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b7198e5...7f0ab27. Read the comment docs.