logto-io / go

☁️ Logto Golang SDKs.
MIT License
19 stars 13 forks source link

refactor: remove redundant HTTP body close Operations #96

Closed xpzouying closed 11 months ago

xpzouying commented 11 months ago

Summary

Removed redundant HTTP body close operations from the function. Since every caller of this function handles the closing operation, there's no need for duplicate closures. While this wouldn't introduce any additional issues, adhering to a consistent closing operation standard is a better practice.

Testing

go test -gcflags=all=-l -count=1 -cover ./...
?       github.com/logto-io/go/gin-sample       [no test files]
ok      github.com/logto-io/go/client   0.587s  coverage: 84.1% of statements
ok      github.com/logto-io/go/core     1.051s  coverage: 84.7% of statements

Checklist