MCPcopy
hub / github.com/netdata/netdata / clone

Method clone

src/go/plugin/framework/chartengine/lifecycle.go:44–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (s materializedState) clone() materializedState {
45 if len(s.charts) == 0 {
46 return newMaterializedState()
47 }
48
49 out := materializedState{
50 charts: make(map[string]*materializedChartState, len(s.charts)),
51 }
52 for chartID, chart := range s.charts {
53 if chart == nil {
54 continue
55 }
56 out.charts[chartID] = chart.clone()
57 }
58 return out
59}
60
61func (c *materializedChartState) clone() *materializedChartState {
62 if c == nil {

Callers 2

preparePlanMethod · 0.45

Calls 1

newMaterializedStateFunction · 0.85

Tested by 1