Update to go 1.19

This commit is contained in:
9seconds
2022-08-09 17:41:59 +03:00
parent 9d67414db6
commit f48156814b
60 changed files with 260 additions and 260 deletions
+2 -2
View File
@@ -30,7 +30,7 @@ type connection struct {
channelConnDetach chan conntypes.ConnID
}
func (c *connection) run() { // nolint: cyclop
func (c *connection) run() { //nolint: cyclop
defer c.Close()
ttl := time.NewTimer(connectionTTL)
@@ -148,7 +148,7 @@ func newConnection(req *protocol.TelegramRequest) (*connection, error) {
return nil, fmt.Errorf("cannot create a new connection: %w", err)
}
id := rand.Int() // nolint: gosec
id := rand.Int() //nolint: gosec
rv := &connection{
conn: conn,
id: id,
+1 -1
View File
@@ -18,7 +18,7 @@ func (h *hub) Register(req *protocol.TelegramRequest) (*ProxyConn, error) {
}
func (h *hub) getMux(req *protocol.TelegramRequest) *mux {
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol()) // nolint: gomnd
key := 32767 + int32(req.ClientProtocol.DC()) + 100000*int32(req.ClientProtocol.ConnectionProtocol()) //nolint: gomnd
h.mutex.RLock()
m, ok := h.muxes[key]