Write 实现 BackendProtocol.Write
(ctx context.Context, path, content string)
| 139 | |
| 140 | // Write 实现 BackendProtocol.Write |
| 141 | func (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 |
| 147 | func (b *CompositeBackend) Edit(ctx context.Context, path, oldStr, newStr string, replaceAll bool) (*EditResult, error) { |