Repository: milvus-io/milvus-sdk-go
Pull request #626 (2023-11-14 03:44:49)

Fix the typo error for the WithReleasePartitionMsgBase option

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) Report
> Merging [#626](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (b86ddc4) into [master](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/commit/17be3e560613446aa0b27953e238d21b48db8bc6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) (17be3e5) will **decrease** coverage by `0.02%`.
> The diff coverage is `0.00%`.

<details><summary>Additional details and impacted files</summary>


[![Impacted file tree graph](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626/graphs/tree.svg?width=650&height=150&src=pr&token=WJK43PV390&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io)

```diff
@@            Coverage Diff             @@
##           master     #626      +/-   ##
==========================================
- Coverage   74.97%   74.95%   -0.02%     
==========================================
  Files          44       44              
  Lines        4124     4125       +1     
==========================================
  Hits         3092     3092              
- Misses        920      921       +1     
  Partials      112      112              
```


| [Files](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io) | Coverage Δ | |
|---|---|---|
| [client/options\_msg\_base.go](https://app.codecov.io/gh/milvus-io/milvus-sdk-go/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=milvus-io#diff-Y2xpZW50L29wdGlvbnNfbXNnX2Jhc2UuZ28=) | `96.00% <0.00%> (-4.00%)` | :arrow_down: |

</details>
sre-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/626#pullrequestreview-1729050341" title="LGTM">congqixia</a>*, *<a href="https://github.com/milvus-io/milvus-sdk-go/pull/626#" title="Author self-approved">SimFG</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=milvus-io%2Fmilvus-sdk-go).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/milvus-io/milvus-sdk-go/blob/master/OWNERS)~~ [congqixia]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
congqixia: /kind improvement

Patch:
diff --git a/client/options_msg_base.go b/client/options_msg_base.go
index a8c6013..cafc443 100644
--- a/client/options_msg_base.go
+++ b/client/options_msg_base.go
@@ -71,7 +71,12 @@ func WithLoadPartitionsMsgBase(msgBase *commonpb.MsgBase) LoadPartitionsOption {
 	}
 }
 
+// Deprecated: use WithReleaseCollectionMsgBase instead
 func WithReleasePartitionMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
+	return WithReleasePartitionsMsgBase(msgBase)
+}
+
+func WithReleasePartitionsMsgBase(msgBase *commonpb.MsgBase) ReleasePartitionsOption {
 	return func(req *milvuspb.ReleasePartitionsRequest) {
 		req.Base = msgBase
 	}


Test patch:
diff --git a/client/partition_test.go b/client/partition_test.go
index 685472b..588eb42 100644
--- a/client/partition_test.go
+++ b/client/partition_test.go
@@ -188,7 +188,7 @@ func TestGrpcClientReleasePartitions(t *testing.T) {
 	})
 	defer mockServer.SetInjection(MHasPartition, hasPartitionInjection(t, testCollectionName, false, "testPart"))
 
-	assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionMsgBase(&commonpb.MsgBase{})))
+	assert.Nil(t, c.ReleasePartitions(ctx, testCollectionName, parts, WithReleasePartitionsMsgBase(&commonpb.MsgBase{})))
 }
 
 func TestGrpcShowPartitions(t *testing.T) {