mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
cleanup: address ifshort linter issues
This commit addresses ifshort linter issues which checks if short syntax for if-statements is possible. updates: #1586 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -153,8 +153,7 @@ var id uint64
|
||||
func contextIDInjector(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
atomic.AddUint64(&id, 1)
|
||||
ctx = context.WithValue(ctx, util.CtxKey, id)
|
||||
reqID := getReqID(req)
|
||||
if reqID != "" {
|
||||
if reqID := getReqID(req); reqID != "" {
|
||||
ctx = context.WithValue(ctx, util.ReqID, reqID)
|
||||
}
|
||||
return handler(ctx, req)
|
||||
|
Reference in New Issue
Block a user