Read 实现 BackendProtocol.Read
(ctx context.Context, path string, offset, limit int)
| 133 | |
| 134 | // Read 实现 BackendProtocol.Read |
| 135 | func (b *CompositeBackend) Read(ctx context.Context, path string, offset, limit int) (string, error) { |
| 136 | backend, strippedPath := b.selectBackend(path) |
| 137 | return backend.Read(ctx, strippedPath, offset, limit) |
| 138 | } |
| 139 | |
| 140 | // Write 实现 BackendProtocol.Write |
| 141 | func (b *CompositeBackend) Write(ctx context.Context, path, content string) (*WriteResult, error) { |