modernize code (#4947)
Some checks failed
code_lint / go (push) Has been cancelled
code_lint / go_mod (push) Has been cancelled
code_lint / docs (push) Has been cancelled
code_lint / api_docs (push) Has been cancelled
code_test / test_64 (push) Has been cancelled
code_test / test_32 (push) Has been cancelled
code_test / test_e2e (push) Has been cancelled

This commit is contained in:
Alessandro Ros 2025-09-07 16:08:47 +02:00 committed by GitHub
parent 3a4d4e1802
commit e0f4748839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 19 additions and 43 deletions

View file

@ -13,8 +13,8 @@ import (
"github.com/stretchr/testify/require"
)
func timePtr(t time.Time) *time.Time {
return &t
func ptrOf[T any](v T) *T {
return &v
}
type dummyPathManager struct{}
@ -31,7 +31,7 @@ func (dummyPathManager) APIPathsList() (*defs.APIPathList, error) {
ID: "123324354",
},
Ready: true,
ReadyTime: timePtr(time.Date(2003, 11, 4, 23, 15, 7, 0, time.UTC)),
ReadyTime: ptrOf(time.Date(2003, 11, 4, 23, 15, 7, 0, time.UTC)),
Tracks: []string{"H264", "H265"},
BytesReceived: 123,
BytesSent: 456,