handle Loader.Load return value error

This commit is contained in:
Allenxuxu
2020-01-19 16:31:02 +08:00
parent 1983d607f3
commit a82fd19209
3 changed files with 25 additions and 11 deletions

View File

@@ -43,11 +43,11 @@ type Option func(o *Options)
var (
// Default Config Manager
DefaultConfig = NewConfig()
DefaultConfig, _ = NewConfig()
)
// NewConfig returns new config
func NewConfig(opts ...Option) Config {
func NewConfig(opts ...Option) (Config, error) {
return newConfig(opts...)
}