multiple discord senders

This commit is contained in:
2026-01-20 20:58:18 +01:00
parent 76933a04d8
commit 53e6eecb3f
9 changed files with 100 additions and 69 deletions

View File

@@ -10,19 +10,22 @@ import (
)
type Config struct {
WikiBaseURL string
WikiToken string
WikiContentLimit int
RedmineBaseURL string
RedmineKey string
RedmineContentLimit int
GiteaToken string
GiteaBaseURL string
GiteaRepos []string
GiteaContentLimit int
DiscordWebhook string
DiscordFake bool
Interval time.Duration
WikiBaseURL string
WikiToken string
WikiContentLimit int
WikiDiscordWebhook string
RedmineBaseURL string
RedmineKey string
RedmineContentLimit int
RedmineDiscordWebhook string
GiteaToken string
GiteaBaseURL string
GiteaRepos []string
GiteaContentLimit int
GiteaDiscordWebhook string
DiscordWebhook string
DiscordFake bool
Interval time.Duration
}
func envToInteger(key string, defaultValue int) int {
@@ -40,6 +43,6 @@ func envToInteger(key string, defaultValue int) int {
func loadEnv() {
if err := godotenv.Load(); err != nil {
log.Println("Warning: .env file not found, using environment variables")
log.Println("[BOOT] .env file not found")
}
}