(appId string, fileName string, edits []fileutil.EditSpec)
| 340 | } |
| 341 | |
| 342 | func ReplaceInAppFile(appId string, fileName string, edits []fileutil.EditSpec) error { |
| 343 | if err := ValidateAppId(appId); err != nil { |
| 344 | return fmt.Errorf("invalid appId: %w", err) |
| 345 | } |
| 346 | |
| 347 | appDir, err := GetAppDir(appId) |
| 348 | if err != nil { |
| 349 | return err |
| 350 | } |
| 351 | |
| 352 | filePath, err := validateAndResolveFilePath(appDir, fileName) |
| 353 | if err != nil { |
| 354 | return err |
| 355 | } |
| 356 | |
| 357 | return fileutil.ReplaceInFile(filePath, edits) |
| 358 | } |
| 359 | |
| 360 | func ReplaceInAppFilePartial(appId string, fileName string, edits []fileutil.EditSpec) ([]fileutil.EditResult, error) { |
| 361 | if err := ValidateAppId(appId); err != nil { |
nothing calls this directly
no test coverage detected