*StructuredLoggerEntry) as type middleware.LogEntry in return argument:
*StructuredLoggerEntry does not implement middleware.LogEntry (wrong type for Write method)
have Write(int, int, time.Duration)
want Write(int, int, http.Header, time.Duration, interface {})
logging/logger.go:115:36: impossible type assertion:
*StructuredLoggerEntry does not implement middleware.LogEntry (wrong type for Write method)
have Write(int, int, time.Duration)
want Write(int, int, http.Header, time.Duration, interface {})
File:
https://github.com/dhax/go-base/blob/master/logging/logger.go
да, вы пихаете в интерфейс middleware.LogEntry невпихуемое (то, что не реализует данный интерфейс)
Обсуждают сегодня