mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-06 21:57:36 +03:00
run gofumpt, enable the gofumpt linter
This commit is contained in:
parent
598f975024
commit
8752576f26
50 changed files with 132 additions and 109 deletions
|
@ -19,8 +19,10 @@ import (
|
|||
// Note that 0-RTT data doesn't provide replay protection.
|
||||
const MethodGet0RTT = "GET_0RTT"
|
||||
|
||||
const defaultUserAgent = "quic-go HTTP/3"
|
||||
const defaultMaxResponseHeaderBytes = 10 * 1 << 20 // 10 MB
|
||||
const (
|
||||
defaultUserAgent = "quic-go HTTP/3"
|
||||
defaultMaxResponseHeaderBytes = 10 * 1 << 20 // 10 MB
|
||||
)
|
||||
|
||||
var defaultQuicConfig = &quic.Config{
|
||||
MaxIncomingStreams: -1, // don't allow the server to create bidirectional streams
|
||||
|
|
|
@ -22,8 +22,10 @@ type responseWriter struct {
|
|||
logger utils.Logger
|
||||
}
|
||||
|
||||
var _ http.ResponseWriter = &responseWriter{}
|
||||
var _ http.Flusher = &responseWriter{}
|
||||
var (
|
||||
_ http.ResponseWriter = &responseWriter{}
|
||||
_ http.Flusher = &responseWriter{}
|
||||
)
|
||||
|
||||
func newResponseWriter(stream io.Writer, logger utils.Logger) *responseWriter {
|
||||
return &responseWriter{
|
||||
|
|
|
@ -23,6 +23,7 @@ type mockClient struct {
|
|||
func (m *mockClient) RoundTrip(req *http.Request) (*http.Response, error) {
|
||||
return &http.Response{Request: req}, nil
|
||||
}
|
||||
|
||||
func (m *mockClient) Close() error {
|
||||
m.closed = true
|
||||
return nil
|
||||
|
|
|
@ -35,13 +35,11 @@ type contextKey struct {
|
|||
|
||||
func (k *contextKey) String() string { return "quic-go/http3 context value " + k.name }
|
||||
|
||||
var (
|
||||
// ServerContextKey is a context key. It can be used in HTTP
|
||||
// handlers with Context.Value to access the server that
|
||||
// started the handler. The associated value will be of
|
||||
// type *http3.Server.
|
||||
ServerContextKey = &contextKey{"http3-server"}
|
||||
)
|
||||
// ServerContextKey is a context key. It can be used in HTTP
|
||||
// handlers with Context.Value to access the server that
|
||||
// started the handler. The associated value will be of
|
||||
// type *http3.Server.
|
||||
var ServerContextKey = &contextKey{"http3-server"}
|
||||
|
||||
type requestError struct {
|
||||
err error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue