mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 17:04:02 +03:00
Fix linters
This commit is contained in:
@@ -50,6 +50,8 @@ func (t *directTelegram) Init(conn io.ReadWriteCloser) (io.ReadWriteCloser, erro
|
||||
return wrappers.NewStreamCipherRWC(conn, obfs2.Encryptor, obfs2.Decryptor), nil
|
||||
}
|
||||
|
||||
// NewDirectTelegram returns Telegram instance which connects directly
|
||||
// to Telegram bypassing middleproxies.
|
||||
func NewDirectTelegram(conf *config.Config) Telegram {
|
||||
return &directTelegram{baseTelegram{
|
||||
dialer: newDialer(conf),
|
||||
|
||||
@@ -7,6 +7,9 @@ import (
|
||||
"github.com/juju/errors"
|
||||
)
|
||||
|
||||
// Telegram defines an interface to connect to Telegram. This
|
||||
// encapsulates logic of working with middleproxies or direct
|
||||
// connections.
|
||||
type Telegram interface {
|
||||
Dial(int16) (io.ReadWriteCloser, error)
|
||||
Init(io.ReadWriteCloser) (io.ReadWriteCloser, error)
|
||||
|
||||
Reference in New Issue
Block a user