mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
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
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:
parent
3a4d4e1802
commit
e0f4748839
6 changed files with 19 additions and 43 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue