MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / CloneForRuntime

Method CloneForRuntime

internal/config/clone.go:13–19  ·  view source on GitHub ↗

CloneForRuntime returns an independent in-memory snapshot of the full config.

()

Source from the content-addressed store, hash-verified

11
12// CloneForRuntime returns an independent in-memory snapshot of the full config.
13func (cfg *Config) CloneForRuntime() *Config {
14 if cfg == nil {
15 return nil
16 }
17 cloned := cloneRuntimeValue(reflect.ValueOf(cfg))
18 return cloned.Interface().(*Config)
19}
20
21func cloneRuntimeValue(v reflect.Value) reflect.Value {
22 if !v.IsValid() {

Calls 1

cloneRuntimeValueFunction · 0.85