1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00

ci(chore): Fix stylings

This commit is contained in:
github-actions 2021-02-14 03:06:03 +00:00
parent 3ff079f72e
commit 65ab1304e6
58 changed files with 169 additions and 111 deletions

View File

@ -3,11 +3,12 @@ package jce
import (
"bytes"
goBinary "encoding/binary"
"github.com/modern-go/reflect2"
"reflect"
"strconv"
"sync"
"unsafe"
"github.com/modern-go/reflect2"
)
type JceWriter struct {

View File

@ -4,8 +4,9 @@ import (
"bytes"
"crypto/rand"
"encoding/hex"
"github.com/Mrs4s/MiraiGo/utils"
"testing"
"github.com/Mrs4s/MiraiGo/utils"
)
var testTEA = NewTeaCipher([]byte("0123456789ABCDEF"))

View File

@ -4,8 +4,6 @@ import (
"bytes"
"crypto/md5"
"fmt"
"github.com/Mrs4s/MiraiGo/binary/jce"
jsoniter "github.com/json-iterator/go"
"io"
"math"
"math/rand"
@ -18,6 +16,9 @@ import (
"sync/atomic"
"time"
"github.com/Mrs4s/MiraiGo/binary/jce"
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/Mrs4s/MiraiGo/binary"

View File

@ -4,16 +4,17 @@ import (
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"math/rand"
"os"
"runtime/debug"
"github.com/Mrs4s/MiraiGo/client/pb/exciting"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
"github.com/Mrs4s/MiraiGo/protocol/packets"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"io"
"math/rand"
"os"
"runtime/debug"
)
type (

View File

@ -2,6 +2,11 @@ package client
import (
"fmt"
"math/rand"
"net/url"
"strings"
"sync"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/pb/oidb"
@ -10,10 +15,6 @@ import (
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"math/rand"
"net/url"
"strings"
"sync"
)
type (

View File

@ -6,11 +6,6 @@ import (
binary2 "encoding/binary"
"encoding/hex"
"fmt"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"io"
"io/ioutil"
"net"
@ -20,6 +15,12 @@ import (
"sync"
"sync/atomic"
"time"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
)
func (c *QQClient) highwayUpload(ip uint32, port int, updKey, data []byte, cmdId int32) error {

View File

@ -4,6 +4,11 @@ import (
"bytes"
"encoding/hex"
"fmt"
"image"
"io"
"os"
"strings"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/message"
@ -11,10 +16,6 @@ import (
"github.com/Mrs4s/MiraiGo/utils"
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"image"
"io"
"os"
"strings"
)
func init() {

View File

@ -7,11 +7,12 @@
package cmd0x346
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package cmd0x352
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package cmd0x6ff
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package pb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package exciting
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package longmsg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package msf
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package msg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package msg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package msg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package multimsg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package notify
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package oidb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package profilecard
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package profilecard
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package profilecard
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package pttcenter
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package qweb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package qweb
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package richmedia
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -7,11 +7,12 @@
package structmsg
import (
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (

View File

@ -1,12 +1,13 @@
package client
import (
"math/rand"
"time"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/Mrs4s/MiraiGo/message"
"github.com/Mrs4s/MiraiGo/protocol/packets"
"github.com/golang/protobuf/proto"
"math/rand"
"time"
)
func (c *QQClient) SendPrivateMessage(target int64, m *message.SendingMessage) *message.PrivateMessage {

View File

@ -3,6 +3,9 @@ package client
import (
"crypto/md5"
"encoding/hex"
"io"
"os"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/client/pb/cmd0x346"
@ -13,8 +16,6 @@ import (
"github.com/Mrs4s/MiraiGo/utils"
"github.com/pkg/errors"
"google.golang.org/protobuf/proto"
"io"
"os"
)
func init() {

View File

@ -2,6 +2,11 @@ package client
import (
"fmt"
"math/rand"
"sync"
"sync/atomic"
"time"
"github.com/Mrs4s/MiraiGo/binary/jce"
"github.com/Mrs4s/MiraiGo/client/pb"
"github.com/Mrs4s/MiraiGo/client/pb/msf"
@ -11,10 +16,6 @@ import (
"github.com/Mrs4s/MiraiGo/protocol/packets"
"github.com/golang/protobuf/proto"
"github.com/pkg/errors"
"math/rand"
"sync"
"sync/atomic"
"time"
)
func init() {

View File

@ -2,6 +2,7 @@ package message
import (
"encoding/hex"
"github.com/Mrs4s/MiraiGo/binary"
"github.com/Mrs4s/MiraiGo/client/pb/msg"
"github.com/golang/protobuf/proto"

View File

@ -4,8 +4,9 @@ import (
"crypto/elliptic"
"crypto/md5"
"crypto/rand"
"github.com/Mrs4s/MiraiGo/binary"
"math/big"
"github.com/Mrs4s/MiraiGo/binary"
)
type EncryptECDH struct {

View File

@ -1,8 +1,9 @@
package packets
import (
"github.com/Mrs4s/MiraiGo/binary"
"strconv"
"github.com/Mrs4s/MiraiGo/binary"
)
func BuildLoginPacket(uin int64, bodyType byte, key, body, extraData []byte) []byte {

View File

@ -1,9 +1,10 @@
package tlv
import (
"github.com/Mrs4s/MiraiGo/binary"
"math/rand"
"time"
"github.com/Mrs4s/MiraiGo/binary"
)
func T1(uin uint32, ip []byte) []byte {

View File

@ -3,10 +3,11 @@ package tlv
import (
"crypto/md5"
binary2 "encoding/binary"
"github.com/Mrs4s/MiraiGo/binary"
"math/rand"
"strconv"
"time"
"github.com/Mrs4s/MiraiGo/binary"
)
func T106(uin, salt, appId, ssoVer uint32, passwordMd5 [16]byte, guidAvailable bool, guid, tgtgtKey []byte, wtf uint32) []byte {

View File

@ -2,6 +2,7 @@ package tlv
import (
"crypto/md5"
"github.com/Mrs4s/MiraiGo/binary"
)

View File

@ -2,6 +2,7 @@ package tlv
import (
"crypto/md5"
"github.com/Mrs4s/MiraiGo/binary"
)

View File

@ -2,6 +2,7 @@ package tlv
import (
"crypto/md5"
"github.com/Mrs4s/MiraiGo/binary"
)

View File

@ -1,8 +1,9 @@
package tlv
import (
"github.com/Mrs4s/MiraiGo/binary"
"time"
"github.com/Mrs4s/MiraiGo/binary"
)
func T400(g []byte, uin int64, guid, dpwd []byte, j2, j3 int64, randSeed []byte) []byte {

View File

@ -1,9 +1,10 @@
package tlv
import (
"github.com/Mrs4s/MiraiGo/binary"
"strconv"
"strings"
"github.com/Mrs4s/MiraiGo/binary"
)
func T511(domains []string) []byte {