🐛 FIX: 适配go1.19

This commit is contained in:
dexter
2022-10-13 18:37:31 +08:00
parent 80368d1506
commit c214c44f17
6 changed files with 130 additions and 30 deletions

View File

@@ -112,6 +112,9 @@ func (opt *Plugin) assign() {
} else if opt.RawConfig["enable"] == false {
opt.Warn("disabled")
return
} else if opt.RawConfig["enable"] == true {
//移除这个属性防止反序列化报错
delete(opt.RawConfig, "enable")
}
t := reflect.TypeOf(opt.Config).Elem()
// 用全局配置覆盖没有设置的配置