Skip to content

Commit

Permalink
fixed lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumeet Rai committed Sep 23, 2024
1 parent 1e388c6 commit 80e5c8f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/asset/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ func NewService(deps ServiceDeps) (service *Service, cancel func()) {
otel.Handle(err)
}

cancelFnListPtr := cancelFnListPool.Get().(*[]func())
cancelFnListPtr, ok := cancelFnListPool.Get().(*[]func())
if !ok {
cancelFnListPtr = &[]func(){}
}

newService := &Service{
assetRepository: deps.AssetRepo,
Expand All @@ -78,7 +81,7 @@ func NewService(deps ServiceDeps) (service *Service, cancel func()) {
newService.cancelFnList[i]()
}
newService.cancelFnList = newService.cancelFnList[:0]
cancelFnListPool.Put(&newService.cancelFnList)
cancelFnListPool.Put(&newService.cancelFnList)
}
}

Expand Down

0 comments on commit 80e5c8f

Please sign in to comment.