platform: modularize api/gui, add docs-tests-web foundation, and refresh root config

This commit is contained in:
beckline
2026-03-26 22:40:54 +03:00
parent 0e2d7f61ea
commit 6a56d734c2
562 changed files with 70151 additions and 16423 deletions

View File

@@ -0,0 +1,30 @@
package app
import (
"fmt"
"strconv"
"strings"
)
func parsePort(raw string) int {
p := strings.TrimSpace(raw)
if p == "" {
return 0
}
n, err := strconv.Atoi(p)
if err != nil || n <= 0 || n > 65535 {
return 0
}
return n
}
func asString(v any) string {
switch vv := v.(type) {
case string:
return strings.TrimSpace(vv)
case nil:
return ""
default:
return strings.TrimSpace(fmt.Sprint(vv))
}
}