diff --git a/config.go b/config.go index 75d45d4..8492e2c 100644 --- a/config.go +++ b/config.go @@ -11,7 +11,7 @@ import ( ) // Manager is the top-level configuration schema and viper instance. -type Manager[T struct{}] struct { +type Manager[T any] struct { // PreLoad is an optional function that is called before loading the // configuration file. PreLoad func(*Manager[T]) error @@ -37,7 +37,7 @@ type Manager[T struct{}] struct { // NewManager creates a new configuration manager for schema T. Fields in T are // responsible for including any necessary `mapstructure` and `validate` tags // to ensure proper unmarshalling and validation of the configuration schema. -func NewManager[T struct{}](configName, configType, configPath string) *Manager[T] { +func NewManager[T any](configName, configType, configPath string) *Manager[T] { m := &Manager[T]{ viper: viper.New(), }