Reduce cfg boilerplate (#7689)
* reduce cfg boilerplate * fix compile error * user test fix * another test fix * simplify diagnostics / testing
Этот коммит содержится в:
@@ -541,6 +541,14 @@ type Config struct {
|
||||
PluginSettings PluginSettings
|
||||
}
|
||||
|
||||
func (o *Config) Clone() *Config {
|
||||
var ret Config
|
||||
if err := json.Unmarshal([]byte(o.ToJson()), &ret); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &ret
|
||||
}
|
||||
|
||||
func (o *Config) ToJson() string {
|
||||
b, err := json.Marshal(o)
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user