(ctx context.Context, path string)
| 32 | type LocalOperator struct{} |
| 33 | |
| 34 | func (l *LocalOperator) ReadFile(ctx context.Context, path string) (string, error) { |
| 35 | b, err := os.ReadFile(path) |
| 36 | if err != nil { |
| 37 | return err.Error(), nil |
| 38 | } |
| 39 | return string(b), nil |
| 40 | } |
| 41 | |
| 42 | func (l *LocalOperator) WriteFile(ctx context.Context, path, content string) error { |
| 43 | return os.WriteFile(path, []byte(content), 0o666) |
no test coverage detected