(appId string)
| 216 | } |
| 217 | |
| 218 | func DeleteApp(appId string) error { |
| 219 | if err := ValidateAppId(appId); err != nil { |
| 220 | return fmt.Errorf("invalid appId: %w", err) |
| 221 | } |
| 222 | |
| 223 | appDir, err := GetAppDir(appId) |
| 224 | if err != nil { |
| 225 | return err |
| 226 | } |
| 227 | |
| 228 | if err := os.RemoveAll(appDir); err != nil { |
| 229 | return fmt.Errorf("failed to delete app directory: %w", err) |
| 230 | } |
| 231 | |
| 232 | return nil |
| 233 | } |
| 234 | |
| 235 | func validateAndResolveFilePath(appDir string, fileName string) (string, error) { |
| 236 | if filepath.IsAbs(fileName) { |
nothing calls this directly
no test coverage detected