fix: resolve golangci-lint errcheck warnings
Some checks failed
CI / Lint (push) Failing after 59s
CI / Test (push) Failing after 1m39s
CI / Release (push) Has been cancelled
CI / Notify (push) Has been cancelled

- Add error checks for unchecked return values (errcheck)
- Remove unused struct fields (unused)
- Fix gofmt formatting issues
This commit is contained in:
2026-02-20 08:45:19 -05:00
parent 81581337cd
commit 39673d31b8
7 changed files with 55 additions and 58 deletions

View File

@@ -124,7 +124,7 @@ resp, err := h.client.Do(req)
if err != nil {
return nil, fmt.Errorf("http %s %s: %w", req.Method, req.URL.Path, err)
}
defer resp.Body.Close()
defer func() { _ = resp.Body.Close() }()
buf := getBuf()
defer putBuf(buf)
@@ -420,7 +420,6 @@ type MilvusClient struct {
Host string
Port int
Collection string
connected bool
}
// NewMilvusClient creates a Milvus client.