rename GetJournalctlLogs -> GetJournalctlLogsCount

master
serr 2025-04-07 09:54:28 +03:00
parent b81ce295c6
commit 341beefd9b
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ func MainPageHandler(a *models.App) http.HandlerFunc {
// Количество запросов, обработанных сервером за 24ч
if r.Method == "COUNT" {
var count []byte
if count, err = tools.GetJournalctlLogs("server", a.Config.ServerDomain, 24); err != nil {
if count, err = tools.GetJournalctlLogsCount("server", a.Config.ServerDomain, 24); err != nil {
log.Printf("%s", err.Error())
}
SendCount(w, count)

View File

@ -7,7 +7,7 @@ import (
"runtime"
)
func GetJournalctlLogs(serviceName, grepPattern string, hoursAgo int) ([]byte, error) {
func GetJournalctlLogsCount(serviceName, grepPattern string, hoursAgo int) ([]byte, error) {
if runtime.GOOS != "linux" {
return nil, fmt.Errorf("not a linux")