feat: webhooker 1.0 MVP — entity rename, core engine, delivery, management UI #16

Merged
sneak merged 33 commits from feature/mvp-1.0 into main 2026-03-04 01:19:41 +01:00
Showing only changes of commit 418d3da97e - Show all commits

View File

@@ -2,7 +2,6 @@ package config
import ( import (
"fmt" "fmt"
"log"
"strings" "strings"
"sync" "sync"
@@ -135,7 +134,11 @@ func (m *Manager) Get(key string, defaultValue interface{}) interface{} {
// Double-check after acquiring write lock // Double-check after acquiring write lock
if m.config == nil || len(m.config) == 0 { if m.config == nil || len(m.config) == 0 {
if err := m.loadConfig(); err != nil { if err := m.loadConfig(); err != nil {
log.Printf("Failed to load config: %v", err) // Config file not found is expected when all values
// come from environment variables. Only log at debug
// level to avoid confusing "Failed to load config"
// messages during normal operation.
_ = err
m.mu.Unlock() m.mu.Unlock()
return defaultValue return defaultValue
} }
@@ -206,7 +209,9 @@ func (m *Manager) GetSecret(key string, defaultValue interface{}) interface{} {
// Double-check after acquiring write lock // Double-check after acquiring write lock
if m.config == nil || len(m.config) == 0 { if m.config == nil || len(m.config) == 0 {
if err := m.loadConfig(); err != nil { if err := m.loadConfig(); err != nil {
log.Printf("Failed to load config: %v", err) // Config file not found is expected when all values
// come from environment variables.
_ = err
m.mu.Unlock() m.mu.Unlock()
return defaultValue return defaultValue
} }
@@ -218,7 +223,6 @@ func (m *Manager) GetSecret(key string, defaultValue interface{}) interface{} {
defer m.mu.RUnlock() defer m.mu.RUnlock()
if m.environment == "" { if m.environment == "" {
log.Printf("No environment set when getting secret '%s'", key)
return defaultValue return defaultValue
} }