snapshot before legacy cleanup

This commit is contained in:
Naeel
2026-04-27 07:36:06 +03:00
parent 9461026546
commit 7cfe20bf76
25 changed files with 1430 additions and 261 deletions
+2 -2
View File
@@ -90,7 +90,7 @@ func decodeArchiveBytesToSource(decoded []byte) (string, error) {
if len(decoded) == 0 {
return "", io.ErrUnexpectedEOF
}
// Если байты — валидный UTF-8, возвращаем напрямую (python, ruby, perl, php)
// Если байты — валидный UTF-8, возвращаем напрямую (python, ruby, php)
if utf8.Valid(decoded) {
return string(decoded), nil
}
@@ -112,7 +112,7 @@ func decodeZipSource(zipBytes []byte) (string, error) {
}
// Сначала ищем по приоритетным именам
preferred := []string{"main.py", "main.js", "main.go", "handler.go", "handler.js", "handler.py"}
preferred := []string{"main.py", "main.js", "main.go", "main.php", "handler.rb", "handler.pl", "handler.go", "handler.js", "handler.py"}
for _, name := range preferred {
for _, file := range reader.File {
if strings.EqualFold(file.Name, name) {