Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

init_internal_test.go 844B

12345678910111213141516171819202122232425262728
  1. package mtglib
  2. import (
  3. "context"
  4. "github.com/stretchr/testify/mock"
  5. )
  6. type NoopLogger struct{}
  7. func (n NoopLogger) Named(_ string) Logger { return n }
  8. func (n NoopLogger) BindInt(_ string, _ int) Logger { return n }
  9. func (n NoopLogger) BindStr(_, _ string) Logger { return n }
  10. func (n NoopLogger) Printf(_ string, _ ...interface{}) {}
  11. func (n NoopLogger) Info(_ string) {}
  12. func (n NoopLogger) Warning(_ string) {}
  13. func (n NoopLogger) Debug(_ string) {}
  14. func (n NoopLogger) InfoError(_ string, _ error) {}
  15. func (n NoopLogger) WarningError(_ string, _ error) {}
  16. func (n NoopLogger) DebugError(_ string, _ error) {}
  17. type EventStreamMock struct {
  18. mock.Mock
  19. }
  20. func (e *EventStreamMock) Send(ctx context.Context, evt Event) {
  21. e.Called(ctx, evt)
  22. }