// Package notifyrender owns the subject/body templates used by both the // legacy sender (internal/sender) and the worker-driven notification // producer (internal/notifier). It is a leaf package so the notifier package // can pre-render notification content for the worker without importing the // sender package, which would otherwise create an import cycle (sender's // tests already import notifier to drive the legacy loop). package notifyrender import ( "log" "strconv" "rocketgit.ru/rsmon/worker/config/translator" ) // GetCount provides functionality. func GetCount(count int, kind string) string { tr, err := translator.Translator.C(kind, float64(count), 0, strconv.Itoa(count)) if err != nil { log.Println("translator error", err) return "монитор" } return tr } // GetDownMany provides functionality. func GetDownMany(count int) string { return "Не " + GetCount(count, "monitor") } // GetUpMany provides functionality. func GetUpMany(count int) string { return "Снова " + GetCount(count, "monitor") }