mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 10:54:06 +02:00
Add io.Closer guidelines (#29387)
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
1 parent
0676bf52f9
commit
ad0a34b492
7 files changed
+16
-9
No files matched your search
@@ -92,7 +92,7 @@ func (i *Indexer) Ping(_ context.Context) error {
|
||||
}
|
||||
|
||||
func (i *Indexer) Close() {
|
||||
if i == nil {
|
||||
if i == nil || i.Indexer == nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,5 @@ func (i *Indexer) Close() {
|
||||
if i == nil {
|
||||
return
|
||||
}
|
||||
if i.Client == nil {
|
||||
return
|
||||
}
|
||||
i.Client = nil
|
||||
}
|
||||
Reference in new issue
Block a user