From 48762d3269a27097732cd0ce5a87efbed6f240b3 Mon Sep 17 00:00:00 2001 From: serr Date: Sun, 6 Apr 2025 15:43:30 +0300 Subject: [PATCH] some changes --- .gitignore | 3 ++- main.go | 6 ------ tools/logs.go | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 0cffcb3..618f0c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -config.json \ No newline at end of file +config.json +restart.sh \ No newline at end of file diff --git a/main.go b/main.go index 919fee8..b3bc4a9 100644 --- a/main.go +++ b/main.go @@ -9,12 +9,6 @@ import ( "net/http" ) -/* -sudo systemctl stop server.service -go build main.go -sudo systemctl start server.service -*/ - func init() { log.SetPrefix("hikan.ru | ") } diff --git a/tools/logs.go b/tools/logs.go index 903758e..5e5bd8c 100644 --- a/tools/logs.go +++ b/tools/logs.go @@ -25,5 +25,5 @@ func GetJournalctlLogs(serviceName, grepPattern string, hoursAgo int) ([]byte, e return nil, err } - return output.Bytes(), nil + return bytes.TrimSpace(output.Bytes()), nil }