srs/trunk/src
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
..
app HLS/DASH: Fix dispose() to cleanup files after unpublish (#4618) 2026-02-03 19:36:11 -05:00
core Proxy: Modernize internal packages on stdlib and add unit tests. v7.0.145 (#4667) 2026-04-23 07:25:48 -04:00
kernel DVR: Fix HEVC mp4 recording error. v7.0.135 (#4604) (#4604) 2025-12-06 19:49:13 -05:00
main Add ignore configuration for cursor. v7.0.115 (#4547) 2025-10-31 19:11:51 -04:00
protocol SRT: Support default_mode config for short streamid format. v7.0.131 (#4598) 2025-11-30 16:26:04 -05:00
utest HLS/DASH: Fix dispose() to cleanup files after unpublish (#4618) 2026-02-03 19:36:11 -05:00