refactor: openpitrix module

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2019-09-25 14:07:15 +08:00
parent d0dc66cf28
commit 1b5681c12b
314 changed files with 72092 additions and 25762 deletions

27
vendor/github.com/koding/multiconfig/multiloader.go generated vendored Normal file
View File

@@ -0,0 +1,27 @@
package multiconfig
type multiLoader []Loader
// MultiLoader creates a loader that executes the loaders one by one in order
// and returns on the first error.
func MultiLoader(loader ...Loader) Loader {
return multiLoader(loader)
}
// Load loads the source into the config defined by struct s
func (m multiLoader) Load(s interface{}) error {
for _, loader := range m {
if err := loader.Load(s); err != nil {
return err
}
}
return nil
}
// MustLoad loads the source into the struct, it panics if gets any error
func (m multiLoader) MustLoad(s interface{}) {
if err := m.Load(s); err != nil {
panic(err)
}
}