fix golint issues in core/fx (#486)

This commit is contained in:
Kevin Wan
2021-02-19 17:49:39 +08:00
committed by GitHub
parent c376ffc351
commit f238290dd3
6 changed files with 48 additions and 22 deletions

View File

@@ -7,6 +7,7 @@ import (
"syscall"
)
// CloseOnExec makes sure closing the file on process forking.
func CloseOnExec(file *os.File) {
if file != nil {
syscall.CloseOnExec(int(file.Fd()))