Skip to content

Conversation

@tmatth
Copy link

@tmatth tmatth commented Jan 9, 2026

Applied with

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test *.go

N.B. ranging over constants requires go >= 1.22 and testing.Loop requires go1.24 or later.

go.mod Outdated
module github.com/pion/rtp

go 1.21
go 1.22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't bump go version now :(
Maybe we should do it after 4.3.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was wondering about that. Marking as blocked for now.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (1edc72d) to head (d98a350).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #351   +/-   ##
=======================================
  Coverage   82.58%   82.58%           
=======================================
  Files          28       28           
  Lines        3428     3428           
=======================================
  Hits         2831     2831           
  Misses        427      427           
  Partials      170      170           
Flag Coverage Δ
go 82.58% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tmatth tmatth added the blocked label Jan 9, 2026
@JoTurk JoTurk marked this pull request as draft January 9, 2026 15:16
tmatth added 2 commits January 9, 2026 10:17
This allows for ranging over constant and testing.Loop requires go1.24
or later.
@Sean-Der
Copy link
Member

Sean-Der commented Jan 9, 2026

Nice changes @tmatth

Worth adding to ci? Could we use an older version of the tool that doesn't to an upgrade?

@JoTurk
Copy link
Member

JoTurk commented Jan 9, 2026

@Sean-Der we can use it with golangci-lint, but last time i checked, it cased some conflicts with some linters (gosec?), also i'll check how to set it so it doesn't try to force us to update Go version, I'm going to check again after the fact we upgraded golangci-lint to 2.6.

@JoTurk
Copy link
Member

JoTurk commented Jan 9, 2026

@Sean-Der
Copy link
Member

Sean-Der commented Jan 9, 2026

Oh that's nice @JoTurk it's pretty wild how much 'Good Go Code' has changed.

Especially in pion/turn it feels like a time portal :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants