mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
update golangci-lint configuration (#5182)
This commit is contained in:
parent
ac1d4360b2
commit
ff187b6d8a
80 changed files with 294 additions and 309 deletions
|
|
@ -25,7 +25,7 @@ import (
|
|||
// ErrConnNotFound is returned when a connection is not found.
|
||||
var ErrConnNotFound = errors.New("connection not found")
|
||||
|
||||
func interfaceIsEmpty(i interface{}) bool {
|
||||
func interfaceIsEmpty(i any) bool {
|
||||
return reflect.ValueOf(i).Kind() != reflect.Ptr || reflect.ValueOf(i).IsNil()
|
||||
}
|
||||
|
||||
|
|
@ -163,14 +163,14 @@ func (s *Server) Initialize() error {
|
|||
}
|
||||
|
||||
// Log implements logger.Writer.
|
||||
func (s *Server) Log(level logger.Level, format string, args ...interface{}) {
|
||||
func (s *Server) Log(level logger.Level, format string, args ...any) {
|
||||
label := func() string {
|
||||
if s.IsTLS {
|
||||
return "RTMPS"
|
||||
}
|
||||
return "RTMP"
|
||||
}()
|
||||
s.Parent.Log(level, "[%s] "+format, append([]interface{}{label}, args...)...)
|
||||
s.Parent.Log(level, "[%s] "+format, append([]any{label}, args...)...)
|
||||
}
|
||||
|
||||
// Close closes the server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue