fix custom type management

This commit is contained in:
2025-12-24 11:09:57 -05:00
parent 98650211ac
commit 301c19afe1
2 changed files with 32 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ import (
// that overloads *config.AppConfig. Will perform normal env
// substitutions for AppConfig, but env overrides for custom type
// are up to the caller.
func MustLoadConfigInto[T interface{ *config.AppConfig }](ctx context.Context, into T) (context.Context, T) {
func MustLoadConfigInto[T any](ctx context.Context, into T) (context.Context, T) {
// Step 1: Check our custom type for required *config.AppConfig
if err := HasAppConfig(into); err != nil {
panic(err)