update golangci-lint configuration (#5182)

This commit is contained in:
Alessandro Ros 2025-11-11 23:57:52 +01:00 committed by GitHub
parent ac1d4360b2
commit ff187b6d8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 294 additions and 309 deletions

View file

@ -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.