e3.0.1 Bug fix.
This commit is contained in:
1 parent
4053c463d6
commit
64cc9baaef
5 files changed
+19
-10
No files matched your search
+3
-3
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// Quick creates a fully configured Config instance with a single call
|
||||
// This is the recommended way to initialize configuration for most applications
|
||||
func Quick(structDefaults interface{}, envPrefix, configFile string) (*Config, error) {
|
||||
func Quick(structDefaults any, envPrefix, configFile string) (*Config, error) {
|
||||
cfg := New()
|
||||
|
||||
// Register defaults from struct if provided
|
||||
@@ -31,7 +31,7 @@ func Quick(structDefaults interface{}, envPrefix, configFile string) (*Config, e
|
||||
}
|
||||
|
||||
// QuickCustom creates a Config with custom options
|
||||
func QuickCustom(structDefaults interface{}, opts LoadOptions, configFile string) (*Config, error) {
|
||||
func QuickCustom(structDefaults any, opts LoadOptions, configFile string) (*Config, error) {
|
||||
cfg := NewWithOptions(opts)
|
||||
|
||||
// Register defaults from struct if provided
|
||||
@@ -46,7 +46,7 @@ func QuickCustom(structDefaults interface{}, opts LoadOptions, configFile string
|
||||
}
|
||||
|
||||
// MustQuick is like Quick but panics on error
|
||||
func MustQuick(structDefaults interface{}, envPrefix, configFile string) *Config {
|
||||
func MustQuick(structDefaults any, envPrefix, configFile string) *Config {
|
||||
cfg, err := Quick(structDefaults, envPrefix, configFile)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("config initialization failed: %v", err))
|
||||
|
||||
Reference in new issue
Block a user