update
This commit is contained in:
@@ -20,7 +20,15 @@ func LoadFlag() {
|
||||
}
|
||||
}
|
||||
|
||||
func LoadFile(confFile string, conf interface{}) {
|
||||
func LoadFile(confFile string) {
|
||||
vp.SetConfigFile(confFile)
|
||||
err := vp.ReadInConfig()
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("read file fail: %s", err))
|
||||
}
|
||||
}
|
||||
|
||||
func LoadFileTo(confFile string, conf interface{}) {
|
||||
vp.SetConfigFile(confFile)
|
||||
err := vp.ReadInConfig()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user