mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
[skip ci] Add comment for CheckCtxValid (#13202)
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
parent
2f94f3820f
commit
ae00a0a22b
@ -185,6 +185,7 @@ func GetAttrByKeyFromRepeatedKV(key string, kvs []*commonpb.KeyValuePair) (strin
|
|||||||
return "", errors.New("key " + key + " not found")
|
return "", errors.New("key " + key + " not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CheckCtxValid check if the context is valid
|
||||||
func CheckCtxValid(ctx context.Context) bool {
|
func CheckCtxValid(ctx context.Context) bool {
|
||||||
return ctx.Err() != context.DeadlineExceeded && ctx.Err() != context.Canceled
|
return ctx.Err() != context.DeadlineExceeded && ctx.Err() != context.Canceled
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user