MCPcopy Create free account
hub / github.com/rilldata/rill / clone

Method clone

runtime/catalog_cache.go:479–481  ·  view source on GitHub ↗

clone clones a resource such that it is safe to mutate without affecting a cached resource.

(r *runtimev1.Resource)

Source from the content-addressed store, hash-verified

477
478// clone clones a resource such that it is safe to mutate without affecting a cached resource.
479func (c *catalogCache) clone(r *runtimev1.Resource) *runtimev1.Resource {
480 return proto.Clone(r).(*runtimev1.Resource)
481}
482
483// isCyclic returns true if the resource has cyclic references.
484// It must be checked before accessing the resource in c.dag (since cyclic resources are not added to the DAG).

Callers 2

getMethod · 0.95
listMethod · 0.95

Calls 1

CloneMethod · 0.80

Tested by

no test coverage detected