mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 01:33:10 -06:00
Merge branch 's7evink/update-golangci-lint' of github.com:S7evinK/dendrite into s7evink/update-golangci-lint
This commit is contained in:
commit
2443f30ae5
|
|
@ -25,7 +25,7 @@ echo "Installing golangci-lint..."
|
||||||
|
|
||||||
# Make a backup of go.{mod,sum} first
|
# Make a backup of go.{mod,sum} first
|
||||||
cp go.mod go.mod.bak && cp go.sum go.sum.bak
|
cp go.mod go.mod.bak && cp go.sum go.sum.bak
|
||||||
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1
|
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.41.1
|
||||||
|
|
||||||
# Run linting
|
# Run linting
|
||||||
echo "Looking for lint..."
|
echo "Looking for lint..."
|
||||||
|
|
|
||||||
|
|
@ -291,10 +291,7 @@ func Setup(
|
||||||
return util.ErrorResponse(err)
|
return util.ErrorResponse(err)
|
||||||
}
|
}
|
||||||
// If there's a trailing slash, remove it
|
// If there's a trailing slash, remove it
|
||||||
eventType := vars["type"]
|
eventType := strings.TrimSuffix(vars["type"], "/")
|
||||||
if strings.HasSuffix(eventType, "/") {
|
|
||||||
eventType = eventType[:len(eventType)-1]
|
|
||||||
}
|
|
||||||
eventFormat := req.URL.Query().Get("format") == "event"
|
eventFormat := req.URL.Query().Get("format") == "event"
|
||||||
return OnIncomingStateTypeRequest(req.Context(), device, rsAPI, vars["roomID"], eventType, "", eventFormat)
|
return OnIncomingStateTypeRequest(req.Context(), device, rsAPI, vars["roomID"], eventType, "", eventFormat)
|
||||||
})).Methods(http.MethodGet, http.MethodOptions)
|
})).Methods(http.MethodGet, http.MethodOptions)
|
||||||
|
|
@ -315,11 +312,7 @@ func Setup(
|
||||||
return util.ErrorResponse(err)
|
return util.ErrorResponse(err)
|
||||||
}
|
}
|
||||||
emptyString := ""
|
emptyString := ""
|
||||||
eventType := vars["eventType"]
|
eventType := strings.TrimSuffix(vars["eventType"], "/")
|
||||||
// If there's a trailing slash, remove it
|
|
||||||
if strings.HasSuffix(eventType, "/") {
|
|
||||||
eventType = eventType[:len(eventType)-1]
|
|
||||||
}
|
|
||||||
return SendEvent(req, device, vars["roomID"], eventType, nil, &emptyString, cfg, rsAPI, nil)
|
return SendEvent(req, device, vars["roomID"], eventType, nil, &emptyString, cfg, rsAPI, nil)
|
||||||
}),
|
}),
|
||||||
).Methods(http.MethodPut, http.MethodOptions)
|
).Methods(http.MethodPut, http.MethodOptions)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go"
|
"github.com/lucas-clemente/quic-go" //nolint: typecheck
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
"github.com/matrix-org/gomatrixserverlib"
|
||||||
"github.com/neilalexander/utp"
|
"github.com/neilalexander/utp"
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ type Node struct {
|
||||||
config *yggdrasilconfig.NodeConfig
|
config *yggdrasilconfig.NodeConfig
|
||||||
multicast *yggdrasilmulticast.Multicast
|
multicast *yggdrasilmulticast.Multicast
|
||||||
log *gologme.Logger
|
log *gologme.Logger
|
||||||
listener quic.Listener
|
listener quic.Listener //nolint: typecheck
|
||||||
utpSocket *utp.Socket
|
utpSocket *utp.Socket
|
||||||
incoming chan net.Conn
|
incoming chan net.Conn
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue