MCPcopy Create free account
hub / github.com/astercloud/aster / Write

Method Write

pkg/backends/composite.go:141–144  ·  view source on GitHub ↗

Write 实现 BackendProtocol.Write

(ctx context.Context, path, content string)

Source from the content-addressed store, hash-verified

139
140// Write 实现 BackendProtocol.Write
141func (b *CompositeBackend) Write(ctx context.Context, path, content string) (*WriteResult, error) {
142 backend, strippedPath := b.selectBackend(path)
143 return backend.Write(ctx, strippedPath, content)
144}
145
146// Edit 实现 BackendProtocol.Edit
147func (b *CompositeBackend) Edit(ctx context.Context, path, oldStr, newStr string, replaceAll bool) (*EditResult, error) {

Calls 2

selectBackendMethod · 0.95
WriteMethod · 0.65