srs/trunk
Winlin 30fc7775a5
Proxy: Modernize internal packages on stdlib and add unit tests. v7.0.145 (#4667)
Modernizes several `internal/*` packages under the Go proxy, replaces
third-party forks with standard-library primitives, and brings the
test suite from near-zero to high coverage across the touched packages.

Package changes

- **`internal/errors`** — Rewrites the `pkg/errors` fork as a thin
wrapper
  over stdlib `errors`. A single `withStack` struct captures stack
  traces via `runtime.Callers`; `fmt.Errorf("%w", ...)` handles all
  message wrapping. Restores `errors.Is`/`As`/`Unwrap` chain traversal
  (silently broken in the fork) and deletes ~190 lines of stack/frame
  formatting. `Is`, `As`, `Unwrap`, and `Join` are re-exported so
  callers need a single import.
- **`internal/logger`** — Swaps stdlib `log.Logger` for `log/slog` JSON
  handlers with UTC timestamps and custom level labels (`verb`, `debug`,
  `warn`, `error`). Hides `withContextID` (no external callers).
- **`internal/sync`** — Converts `Map[K, V]` from a concrete struct to
  an interface with a `NewMap` constructor for testability.
- **`internal/signal`** — Adds `signalNotify` / `osExit` indirections so
  `InstallSignals` and `InstallForceQuit` can be exercised without real
  OS signals or process termination.
- **`internal/utils`** — Drops deprecated `io/ioutil` and the stdlib
  `errors` alias (the internal `errors` package re-exports what's
  needed).
- **`internal/version`** — No code changes; fully covered by new tests.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 07:25:48 -04:00
..
3rdparty Move build output to bin/, replace godotenv with custom .env parser, and update docs. v7.0.143 (#4661) 2026-04-12 14:26:33 -04:00
auto AI: Build: Improve dependency checking to report all missing dependencies at once. v7.0.105 (#4293) 2025-10-25 22:21:09 -04:00
cmake Refactor: Rename ide/ directory to cmake/ for better clarity (#4539) 2025-10-23 20:38:48 -04:00
conf SRT: Enable tlpktdrop by default to prevent 100% CPU usage. v7.0.133 (#4587) (#4601) 2025-12-04 09:47:01 -05:00
doc Proxy: Modernize internal packages on stdlib and add unit tests. v7.0.145 (#4667) 2026-04-23 07:25:48 -04:00
etc/init.d Squash: Fix bugs 2022-01-13 18:26:28 +08:00
gdb The identifier "ShowCouroutines" needs to be modified to "ShowCoroutines" in order to rectify the typographical error. v6.0.63 (#3703) 2023-07-27 08:12:39 +08:00
packaging/redhat AI: Remove cygwin64, always enable WebRTC, and enforce C++98 compatibility. v7.0.60 (#4447) 2025-08-21 10:03:38 -06:00
research AI: Fix race condition causing immediate deletion of new sources. v7.0.127 (#4449) (#4576) 2025-11-13 21:24:07 -05:00
scripts AI: Add utest to cover encoder module 2025-10-11 08:22:34 -04:00
src Proxy: Modernize internal packages on stdlib and add unit tests. v7.0.145 (#4667) 2026-04-23 07:25:48 -04:00
usr/lib/systemd/system Squash: Support RPM. Fix bugs. 2021-11-04 07:37:17 +08:00
.gitignore rtc2rtmp: Support RTC-to-RTMP remuxing with HEVC. v7.0.43 (#4349) 2025-07-03 08:24:42 -04:00
AUTHORS.md Reorder maintainers ranked by number of commits. 2025-08-14 07:23:03 -06:00
AUTHORS.txt Update AUTHORS 2021-08-25 07:43:35 +08:00
configure RTC: Fix DVR missing first 4-6 seconds by initializing rate from SDP (#4541) 2025-10-28 09:33:40 -04:00
Dockerfile.builds Enable default configure test. 2025-10-28 10:04:53 -04:00
Dockerfile.cov Disable sanitizer by default to fix memory leak. #4364 v7.0.96 2025-10-14 20:32:37 -04:00
Dockerfile.pkg Merge branch v5.0.103 into develop 2022-12-03 21:15:22 +08:00
Dockerfile.test Disable sanitizer by default to fix memory leak. #4364 v7.0.96 2025-10-14 20:32:37 -04:00