Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ linters-settings:
lll:
line-length: 140
goimports:
local-prefixes: github.com/gotd/
local-prefixes: github.com/beeper/
gocritic:
enabled-tags:
- diagnostic
Expand Down
2 changes: 1 addition & 1 deletion _tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/gotd/td/_tools
module github.com/beeper/td/_tools

go 1.22.0

Expand Down
2 changes: 1 addition & 1 deletion bin/buffer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/testutil"
"github.com/beeper/td/testutil"
)

func TestExpandReset(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions bin/encode_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package bin_test
import (
"testing"

"github.com/gotd/td/bin"
"github.com/gotd/td/telegram/message/entity"
"github.com/gotd/td/telegram/message/styling"
"github.com/gotd/td/tg"
"github.com/beeper/td/bin"
"github.com/beeper/td/telegram/message/entity"
"github.com/beeper/td/telegram/message/styling"
"github.com/beeper/td/tg"
)

func BenchmarkDecodeSlice(b *testing.B) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/connclose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/gotd/td/telegram"
"github.com/gotd/td/telegram/message"
"github.com/gotd/td/tg"
"github.com/beeper/td/telegram"
"github.com/beeper/td/telegram/message"
"github.com/beeper/td/tg"
)

func run(ctx context.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dlkey/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"path"

"github.com/gotd/td/keyparser"
"github.com/beeper/td/keyparser"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dltl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strconv"
"strings"

"github.com/gotd/tl"
"github.com/beeper/tl"
)

func mergeSchema(target, s *tl.Schema) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/dscidr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"gopkg.in/yaml.v3"

"github.com/gotd/td/telegram/dcs"
"github.com/beeper/td/telegram/dcs"
)

type CIDRElement struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/gotdecho/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/gotd/td/telegram"
"github.com/gotd/td/telegram/message"
"github.com/gotd/td/tg"
"github.com/beeper/td/telegram"
"github.com/beeper/td/telegram/message"
"github.com/beeper/td/tg"
)

func run(ctx context.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gotdgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/gotd/tl"

"github.com/gotd/td/gen"
"github.com/beeper/td/gen"
)

type formattedSource struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/mtprint/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io"
"os"

"github.com/gotd/td/proto/codec"
"github.com/beeper/td/proto/codec"
)

func main() {
Expand Down
14 changes: 7 additions & 7 deletions cmd/mtprint/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"github.com/go-faster/errors"
"github.com/k0kubun/pp/v3"

"github.com/gotd/td/bin"
"github.com/gotd/td/mt"
"github.com/gotd/td/proto/codec"
"github.com/gotd/td/tdp"
"github.com/gotd/td/tg"
"github.com/gotd/td/tmap"
"github.com/gotd/td/transport"
"github.com/beeper/td/bin"
"github.com/beeper/td/mt"
"github.com/beeper/td/proto/codec"
"github.com/beeper/td/tdp"
"github.com/beeper/td/tg"
"github.com/beeper/td/tmap"
"github.com/beeper/td/transport"
)

// Object is abstraction for TL schema object.
Expand Down
8 changes: 4 additions & 4 deletions cmd/mtprint/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/bin"
"github.com/gotd/td/mt"
"github.com/gotd/td/proto/codec"
"github.com/gotd/td/tg"
"github.com/beeper/td/bin"
"github.com/beeper/td/mt"
"github.com/beeper/td/proto/codec"
"github.com/beeper/td/tg"
)

func Test_readAndPrint(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions cmd/rsagen/_example/generate.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package example

//go:generate go run github.com/gotd/td/cmd/rsagen -f single.pem -single -pkg example -var SinglePK -o rsagen_single.go
//go:generate go run github.com/gotd/td/cmd/rsagen -f single.pem -single -pkg example -var SinglePK -o rsagen_single_test.go -exec test.tmpl
//go:generate go run github.com/beeper/td/cmd/rsagen -f single.pem -single -pkg example -var SinglePK -o rsagen_single.go
//go:generate go run github.com/beeper/td/cmd/rsagen -f single.pem -single -pkg example -var SinglePK -o rsagen_single_test.go -exec test.tmpl

//go:generate go run github.com/gotd/td/cmd/rsagen -f many.pem -pkg example -var ManyPK -o rsagen_many.go
//go:generate go run github.com/gotd/td/cmd/rsagen -f many.pem -pkg example -var ManyPK -o rsagen_many_test.go -exec test.tmpl
//go:generate go run github.com/beeper/td/cmd/rsagen -f many.pem -pkg example -var ManyPK -o rsagen_many.go
//go:generate go run github.com/beeper/td/cmd/rsagen -f many.pem -pkg example -var ManyPK -o rsagen_many_test.go -exec test.tmpl

//go:generate go run github.com/gotd/td/cmd/rsagen -pkg example -var EmptyPK -o rsagen_empty.go
//go:generate go run github.com/gotd/td/cmd/rsagen -pkg example -var EmptyPK -o rsagen_empty_test.go -exec test.tmpl
//go:generate go run github.com/beeper/td/cmd/rsagen -pkg example -var EmptyPK -o rsagen_empty.go
//go:generate go run github.com/beeper/td/cmd/rsagen -pkg example -var EmptyPK -o rsagen_empty_test.go -exec test.tmpl
2 changes: 1 addition & 1 deletion cmd/rsagen/_example/rsagen_empty_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/rsagen/_example/rsagen_many_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/rsagen/_example/rsagen_single_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/rsagen/_template/test.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/gotd/td/crypto"
"github.com/beeper/td/crypto"
)

func {{ .TestFunc }}(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/rsagen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/go-faster/errors"

"github.com/gotd/td/crypto"
"github.com/beeper/td/crypto"
)

//go:embed _template/*.tmpl
Expand Down
2 changes: 1 addition & 1 deletion crypto/cipher_decrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/gotd/ige"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// DecryptFromBuffer decodes EncryptedMessage and decrypts it.
Expand Down
4 changes: 2 additions & 2 deletions crypto/cipher_decrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/bin"
"github.com/gotd/td/testutil"
"github.com/beeper/td/bin"
"github.com/beeper/td/testutil"
)

func TestDecrypt(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/cipher_encrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gotd/ige"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

func countPadding(l int) int { return 16 + (16 - (l % 16)) }
Expand Down
4 changes: 2 additions & 2 deletions crypto/cipher_encrypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/bin"
"github.com/gotd/td/testutil"
"github.com/beeper/td/bin"
"github.com/beeper/td/testutil"
)

func TestEncrypt(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/cipher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

var testAuthKey = Key{
Expand Down
2 changes: 1 addition & 1 deletion crypto/encrypted_message.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package crypto

import "github.com/gotd/td/bin"
import "github.com/beeper/td/bin"

// EncryptedMessage of protocol.
type EncryptedMessage struct {
Expand Down
2 changes: 1 addition & 1 deletion crypto/encrypted_message_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package crypto
import (
"github.com/go-faster/errors"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// EncryptedMessageData is stored in EncryptedMessage.EncryptedData.
Expand Down
2 changes: 1 addition & 1 deletion crypto/encrypted_message_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package crypto
import (
"testing"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"

"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion crypto/encrypted_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/big"
"testing"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

func TestEncryptedMessage_Encode(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/go-faster/errors"
"github.com/gotd/ige"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// DecryptExchangeAnswer decrypts messages created during key exchange.
Expand Down
2 changes: 1 addition & 1 deletion crypto/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"math/rand"
"testing"

"github.com/gotd/td/testutil"
"github.com/beeper/td/testutil"
)

func FuzzRSA(f *testing.F) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

func TestAuthKeyID(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package crypto
import (
"crypto/sha256"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// Side on which encryption is performed.
Expand Down
2 changes: 1 addition & 1 deletion crypto/keys_old.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package crypto
import (
"crypto/sha1" // #nosec G505

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// sha1a returns sha1_a value.
Expand Down
2 changes: 1 addition & 1 deletion crypto/keys_old_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/gotd/ige"
"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

func TestOldKeys(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions crypto/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"io"
"testing"

"github.com/gotd/td/bin"
"github.com/gotd/td/testutil"
"github.com/beeper/td/bin"
"github.com/beeper/td/testutil"
)

func genMessageAndAuthKeys() (Key, bin.Int128) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package crypto
import (
"io"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// RandInt64n returns random int64 from randSource in [0; n).
Expand Down
2 changes: 1 addition & 1 deletion crypto/rsa_fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/binary"
"math/big"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

// RSAFingerprint returns fingerprint of RSA public key as defined in MTProto.
Expand Down
2 changes: 1 addition & 1 deletion crypto/rsa_pad.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/go-faster/xor"
"github.com/gotd/ige"

"github.com/gotd/td/bin"
"github.com/beeper/td/bin"
)

func reverseBytes(s []byte) {
Expand Down
2 changes: 1 addition & 1 deletion crypto/rsa_pad_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/gotd/td/testutil"
"github.com/beeper/td/testutil"
)

func TestRSAPad(t *testing.T) {
Expand Down
Loading