1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-27 23:18:34 +02:00

сделал telegram_bot

This commit is contained in:
Nikitin Aleksandr
2024-11-11 16:36:51 +03:00
parent cf99f1aad5
commit 942977504e
5 changed files with 96 additions and 16 deletions

19
microl/microl.go Normal file
View File

@@ -0,0 +1,19 @@
// пакет для микрофункций с логгером
package microl
import (
"github.com/ManyakRus/starter/log"
"os"
)
// Getenv - возвращает переменную окружения
func Getenv(Name string, IsRequired bool) string {
TextError := "Need fill OS environment variable: "
Otvet := os.Getenv(Name)
if IsRequired == true && Otvet == "" {
log.Error(TextError + Name)
}
return Otvet
}