From 1a677a4b7ee0df7d794cbfc51877878ce57dd5ad Mon Sep 17 00:00:00 2001 From: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Date: Sat, 10 Feb 2024 13:23:04 +0300 Subject: [PATCH] removed some empty lines --- web/job/check_client_ip_job.go | 1 - web/job/clear_logs_job.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 859a55e9..51a09db8 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -64,7 +64,6 @@ func (j *CheckClientIpJob) clearLogTime() { } func (j *CheckClientIpJob) clearAccessLog() { - accessLogPath := xray.GetAccessLogPath() logAccessP, err := os.OpenFile(xray.GetAccessPersistentLogPath(), os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644) j.checkError(err) diff --git a/web/job/clear_logs_job.go b/web/job/clear_logs_job.go index 5dca68c5..c6312006 100644 --- a/web/job/clear_logs_job.go +++ b/web/job/clear_logs_job.go @@ -16,7 +16,7 @@ func NewClearLogsJob() *ClearLogsJob { func (j *ClearLogsJob) Run() { logFiles := []string{xray.GetIPLimitLogPath(), xray.GetIPLimitBannedLogPath(), xray.GetAccessPersistentLogPath()} logFilesPrev := []string{xray.GetIPLimitBannedPrevLogPath(), xray.GetAccessPersistentPrevLogPath()} - + // clear old previous logs for i := 0; i < len(logFilesPrev); i++ { if err := os.Truncate(logFilesPrev[i], 0); err != nil { @@ -26,7 +26,6 @@ func (j *ClearLogsJob) Run() { // clear log files and copy to previous logs for i := 0; i < len(logFiles); i++ { - if i > 0 { // copy to previous logs logFilePrev, err := os.OpenFile(logFilesPrev[i-1], os.O_CREATE|os.O_APPEND|os.O_RDWR, 0644)