mirror of
https://github.com/golang/go
synced 2024-11-05 17:46:16 -07:00
internal/lsp: cleanup temporary go.mod file on shutdown
This commit will delete the temporary go.mod file that is attached to a view when the session is shutdown. Updates golang/go#31999 Change-Id: I0f6b0663b0a814ce45d9b12468669f415f8c36aa Reviewed-on: https://go-review.googlesource.com/c/tools/+/212479 Reviewed-by: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
a7b3459f04
commit
c7341709c6
3
internal/lsp/cache/view.go
vendored
3
internal/lsp/cache/view.go
vendored
@ -304,6 +304,9 @@ func (v *view) shutdown(context.Context) {
|
|||||||
v.cancel()
|
v.cancel()
|
||||||
v.cancel = nil
|
v.cancel = nil
|
||||||
}
|
}
|
||||||
|
if v.modfiles != nil {
|
||||||
|
os.Remove(v.modfiles.temp)
|
||||||
|
}
|
||||||
debug.DropView(debugView{v})
|
debug.DropView(debugView{v})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user