(ctx context.Context, explanation, targetFile, contents string)
| 40 | } |
| 41 | |
| 42 | func (env *Environment) FileWrite(ctx context.Context, explanation, targetFile, contents string) error { |
| 43 | err := env.apply(ctx, env.container().WithNewFile(targetFile, contents)) |
| 44 | if err != nil { |
| 45 | return fmt.Errorf("failed applying file write, skipping git propagation: %w", err) |
| 46 | } |
| 47 | env.Notes.Add("Write %s", targetFile) |
| 48 | return nil |
| 49 | } |
| 50 | |
| 51 | func (env *Environment) FileEdit(ctx context.Context, explanation, targetFile, search, replace, matchID string) error { |
| 52 | contents, err := env.container().File(targetFile).Contents(ctx) |
no test coverage detected