Fix linter issues

This commit is contained in:
2026-05-27 10:58:13 +03:00
parent 11a357ebc4
commit 024d5fd96c
13 changed files with 145 additions and 46 deletions

View File

@@ -29,9 +29,9 @@ func (a *App) Logger() *logrus.Entry {
}
func New(ctx context.Context) *App {
var m runtime.MemStats
var memStats runtime.MemStats
runtime.ReadMemStats(&m)
runtime.ReadMemStats(&memStats)
app := new(App)
@@ -43,9 +43,9 @@ func New(ctx context.Context) *App {
})
app.logger = logger.WithContext(ctx).WithFields(logrus.Fields{
"memalloc": fmt.Sprintf("%dMB", m.Alloc/1024/1024),
"memsys": fmt.Sprintf("%dMB", m.Sys/1024/1024),
"numgc": strconv.FormatUint(uint64(m.NumGC), 10),
"memalloc": fmt.Sprintf("%dMB", memStats.Alloc/1024/1024),
"memsys": fmt.Sprintf("%dMB", memStats.Sys/1024/1024),
"numgc": strconv.FormatUint(uint64(memStats.NumGC), 10),
})
app.domains = make(map[string]domains.Domain)