feat: make CheckPorts concurrent and add port validation

- CheckPorts now runs all port checks concurrently using errgroup
- Added port number validation (1-65535) with ErrInvalidPort sentinel error
- Updated PortChecker interface to use *PortResult return type
- Added tests for invalid port numbers (0, negative, >65535)
- All checks pass (make check clean)
Этот коммит содержится в:
user
2026-02-20 00:14:55 -08:00
родитель ab39e77015
Коммит 57cd228837
7 изменённых файлов: 149 добавлений и 40 удалений
+1
Просмотреть файл
@@ -11,6 +11,7 @@ require (
github.com/spf13/viper v1.21.0
go.uber.org/fx v1.24.0
golang.org/x/net v0.50.0
golang.org/x/sync v0.19.0
)
require (