func environmentCleanup() { log.Debug("Cleaning up environment...") if lockFile != nil { util.UnlockFile(lockFile) } if logFile != nil { logFile.Close() } if r := recover(); r != nil { api.ResponseLogAndError(r) os.Exit(1) } }
func cleanup() { if r := recover(); r != nil { api.ResponseLogAndError(r) os.Exit(1) } }