From 3ffea5d8c4385ba1ff820cbc57a87c96a7f3ac4b Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sun, 11 Nov 2018 12:44:16 +0700 Subject: [PATCH] internalize the qerr package --- client.go | 2 +- client_test.go | 2 +- h2quic/client.go | 2 +- h2quic/client_test.go | 2 +- h2quic/server.go | 2 +- h2quic/server_test.go | 2 +- integrationtests/self/handshake_rtt_test.go | 2 +- internal/ackhandler/received_packet_history.go | 2 +- internal/ackhandler/sent_packet_handler.go | 2 +- internal/flowcontrol/connection_flow_controller.go | 2 +- internal/flowcontrol/stream_flow_controller.go | 2 +- internal/flowcontrol/stream_flow_controller_test.go | 2 +- internal/handshake/tls_extension_handler_client.go | 2 +- internal/handshake/tls_extension_handler_server.go | 2 +- {qerr => internal/qerr}/error_codes.go | 0 {qerr => internal/qerr}/errorcode_string.go | 0 {qerr => internal/qerr}/errorcodes_test.go | 0 {qerr => internal/qerr}/errors_suite_test.go | 0 {qerr => internal/qerr}/quic_error.go | 0 {qerr => internal/qerr}/quic_error_test.go | 0 internal/wire/connection_close_frame.go | 2 +- internal/wire/connection_close_frame_test.go | 2 +- internal/wire/frame_parser.go | 2 +- internal/wire/frame_parser_test.go | 2 +- internal/wire/header_parser.go | 2 +- internal/wire/header_parser_test.go | 2 +- internal/wire/stream_frame.go | 2 +- internal/wire/stream_frame_test.go | 2 +- packet_unpacker.go | 2 +- packet_unpacker_test.go | 2 +- session.go | 2 +- session_test.go | 2 +- streams_map_outgoing_bidi.go | 2 +- streams_map_outgoing_generic.go | 2 +- streams_map_outgoing_generic_test.go | 2 +- streams_map_outgoing_uni.go | 2 +- streams_map_test.go | 2 +- 37 files changed, 31 insertions(+), 31 deletions(-) rename {qerr => internal/qerr}/error_codes.go (100%) rename {qerr => internal/qerr}/errorcode_string.go (100%) rename {qerr => internal/qerr}/errorcodes_test.go (100%) rename {qerr => internal/qerr}/errors_suite_test.go (100%) rename {qerr => internal/qerr}/quic_error.go (100%) rename {qerr => internal/qerr}/quic_error_test.go (100%) diff --git a/client.go b/client.go index 70e490b0..89e4b0ce 100644 --- a/client.go +++ b/client.go @@ -10,9 +10,9 @@ import ( "github.com/lucas-clemente/quic-go/internal/handshake" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type client struct { diff --git a/client_test.go b/client_test.go index 33b58144..41003f38 100644 --- a/client_test.go +++ b/client_test.go @@ -13,9 +13,9 @@ import ( "github.com/golang/mock/gomock" "github.com/lucas-clemente/quic-go/internal/handshake" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/h2quic/client.go b/h2quic/client.go index 10366d22..62a81248 100644 --- a/h2quic/client.go +++ b/h2quic/client.go @@ -16,8 +16,8 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) type roundTripperOpts struct { diff --git a/h2quic/client_test.go b/h2quic/client_test.go index d4732c63..21c47768 100644 --- a/h2quic/client_test.go +++ b/h2quic/client_test.go @@ -14,8 +14,8 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" "time" diff --git a/h2quic/server.go b/h2quic/server.go index cd9cbea2..6ccc7452 100644 --- a/h2quic/server.go +++ b/h2quic/server.go @@ -14,8 +14,8 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" ) diff --git a/h2quic/server_test.go b/h2quic/server_test.go index 6125f2bc..e37ef97c 100644 --- a/h2quic/server_test.go +++ b/h2quic/server_test.go @@ -18,9 +18,9 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/testdata" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/integrationtests/self/handshake_rtt_test.go b/integrationtests/self/handshake_rtt_test.go index b93e985a..900b1dbb 100644 --- a/integrationtests/self/handshake_rtt_test.go +++ b/integrationtests/self/handshake_rtt_test.go @@ -8,7 +8,7 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/integrationtests/tools/proxy" "github.com/lucas-clemente/quic-go/internal/protocol" - "github.com/lucas-clemente/quic-go/qerr" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/testdata" . "github.com/onsi/ginkgo" diff --git a/internal/ackhandler/received_packet_history.go b/internal/ackhandler/received_packet_history.go index 758286df..1da22be5 100644 --- a/internal/ackhandler/received_packet_history.go +++ b/internal/ackhandler/received_packet_history.go @@ -2,9 +2,9 @@ package ackhandler import ( "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) // The receivedPacketHistory stores if a packet number has already been received. diff --git a/internal/ackhandler/sent_packet_handler.go b/internal/ackhandler/sent_packet_handler.go index 176f08b5..0e253354 100644 --- a/internal/ackhandler/sent_packet_handler.go +++ b/internal/ackhandler/sent_packet_handler.go @@ -8,9 +8,9 @@ import ( "github.com/lucas-clemente/quic-go/internal/congestion" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) const ( diff --git a/internal/flowcontrol/connection_flow_controller.go b/internal/flowcontrol/connection_flow_controller.go index d18eaf55..e4dc4edc 100644 --- a/internal/flowcontrol/connection_flow_controller.go +++ b/internal/flowcontrol/connection_flow_controller.go @@ -5,8 +5,8 @@ import ( "github.com/lucas-clemente/quic-go/internal/congestion" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) type connectionFlowController struct { diff --git a/internal/flowcontrol/stream_flow_controller.go b/internal/flowcontrol/stream_flow_controller.go index 2048e9bf..5e58b566 100644 --- a/internal/flowcontrol/stream_flow_controller.go +++ b/internal/flowcontrol/stream_flow_controller.go @@ -5,8 +5,8 @@ import ( "github.com/lucas-clemente/quic-go/internal/congestion" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) type streamFlowController struct { diff --git a/internal/flowcontrol/stream_flow_controller_test.go b/internal/flowcontrol/stream_flow_controller_test.go index 3c364005..35e1d143 100644 --- a/internal/flowcontrol/stream_flow_controller_test.go +++ b/internal/flowcontrol/stream_flow_controller_test.go @@ -5,8 +5,8 @@ import ( "github.com/lucas-clemente/quic-go/internal/congestion" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/handshake/tls_extension_handler_client.go b/internal/handshake/tls_extension_handler_client.go index 182b256a..03d7a4ea 100644 --- a/internal/handshake/tls_extension_handler_client.go +++ b/internal/handshake/tls_extension_handler_client.go @@ -4,8 +4,8 @@ import ( "errors" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" "github.com/marten-seemann/qtls" ) diff --git a/internal/handshake/tls_extension_handler_server.go b/internal/handshake/tls_extension_handler_server.go index 152e10f9..732f8dc0 100644 --- a/internal/handshake/tls_extension_handler_server.go +++ b/internal/handshake/tls_extension_handler_server.go @@ -4,8 +4,8 @@ import ( "errors" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" "github.com/marten-seemann/qtls" ) diff --git a/qerr/error_codes.go b/internal/qerr/error_codes.go similarity index 100% rename from qerr/error_codes.go rename to internal/qerr/error_codes.go diff --git a/qerr/errorcode_string.go b/internal/qerr/errorcode_string.go similarity index 100% rename from qerr/errorcode_string.go rename to internal/qerr/errorcode_string.go diff --git a/qerr/errorcodes_test.go b/internal/qerr/errorcodes_test.go similarity index 100% rename from qerr/errorcodes_test.go rename to internal/qerr/errorcodes_test.go diff --git a/qerr/errors_suite_test.go b/internal/qerr/errors_suite_test.go similarity index 100% rename from qerr/errors_suite_test.go rename to internal/qerr/errors_suite_test.go diff --git a/qerr/quic_error.go b/internal/qerr/quic_error.go similarity index 100% rename from qerr/quic_error.go rename to internal/qerr/quic_error.go diff --git a/qerr/quic_error_test.go b/internal/qerr/quic_error_test.go similarity index 100% rename from qerr/quic_error_test.go rename to internal/qerr/quic_error_test.go diff --git a/internal/wire/connection_close_frame.go b/internal/wire/connection_close_frame.go index fead57a1..4f523474 100644 --- a/internal/wire/connection_close_frame.go +++ b/internal/wire/connection_close_frame.go @@ -5,8 +5,8 @@ import ( "io" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) // A ConnectionCloseFrame is a CONNECTION_CLOSE frame diff --git a/internal/wire/connection_close_frame_test.go b/internal/wire/connection_close_frame_test.go index 9f79ea6c..5a36653f 100644 --- a/internal/wire/connection_close_frame_test.go +++ b/internal/wire/connection_close_frame_test.go @@ -5,7 +5,7 @@ import ( "io" "github.com/lucas-clemente/quic-go/internal/protocol" - "github.com/lucas-clemente/quic-go/qerr" + "github.com/lucas-clemente/quic-go/internal/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/frame_parser.go b/internal/wire/frame_parser.go index 449b6c47..be6c1bc0 100644 --- a/internal/wire/frame_parser.go +++ b/internal/wire/frame_parser.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/lucas-clemente/quic-go/internal/protocol" - "github.com/lucas-clemente/quic-go/qerr" + "github.com/lucas-clemente/quic-go/internal/qerr" ) // ParseNextFrame parses the next frame diff --git a/internal/wire/frame_parser_test.go b/internal/wire/frame_parser_test.go index 153db21b..b8678449 100644 --- a/internal/wire/frame_parser_test.go +++ b/internal/wire/frame_parser_test.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/internal/protocol" - "github.com/lucas-clemente/quic-go/qerr" + "github.com/lucas-clemente/quic-go/internal/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/header_parser.go b/internal/wire/header_parser.go index 1e916e2e..f90a50c9 100644 --- a/internal/wire/header_parser.go +++ b/internal/wire/header_parser.go @@ -6,8 +6,8 @@ import ( "io" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) // The InvariantHeader is the version independent part of the header diff --git a/internal/wire/header_parser_test.go b/internal/wire/header_parser_test.go index ebe7550c..7d35d8ec 100644 --- a/internal/wire/header_parser_test.go +++ b/internal/wire/header_parser_test.go @@ -5,8 +5,8 @@ import ( "io" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/internal/wire/stream_frame.go b/internal/wire/stream_frame.go index 2321db08..70065842 100644 --- a/internal/wire/stream_frame.go +++ b/internal/wire/stream_frame.go @@ -6,8 +6,8 @@ import ( "io" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" ) // A StreamFrame of QUIC diff --git a/internal/wire/stream_frame_test.go b/internal/wire/stream_frame_test.go index 7fcf591c..211acb3e 100644 --- a/internal/wire/stream_frame_test.go +++ b/internal/wire/stream_frame_test.go @@ -4,8 +4,8 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/packet_unpacker.go b/packet_unpacker.go index 9329a215..f073395f 100644 --- a/packet_unpacker.go +++ b/packet_unpacker.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type unpackedPacket struct { diff --git a/packet_unpacker_test.go b/packet_unpacker_test.go index 780aa4de..2acedc76 100644 --- a/packet_unpacker_test.go +++ b/packet_unpacker_test.go @@ -5,8 +5,8 @@ import ( "github.com/golang/mock/gomock" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/session.go b/session.go index b04dd179..e37985cf 100644 --- a/session.go +++ b/session.go @@ -15,9 +15,9 @@ import ( "github.com/lucas-clemente/quic-go/internal/flowcontrol" "github.com/lucas-clemente/quic-go/internal/handshake" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type unpacker interface { diff --git a/session_test.go b/session_test.go index 14f8e704..45cdce12 100644 --- a/session_test.go +++ b/session_test.go @@ -18,9 +18,9 @@ import ( "github.com/lucas-clemente/quic-go/internal/mocks" "github.com/lucas-clemente/quic-go/internal/mocks/ackhandler" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type mockConnection struct { diff --git a/streams_map_outgoing_bidi.go b/streams_map_outgoing_bidi.go index ce3cd8c1..c2066a63 100644 --- a/streams_map_outgoing_bidi.go +++ b/streams_map_outgoing_bidi.go @@ -9,8 +9,8 @@ import ( "sync" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type outgoingBidiStreamsMap struct { diff --git a/streams_map_outgoing_generic.go b/streams_map_outgoing_generic.go index 5df1d685..968436d3 100644 --- a/streams_map_outgoing_generic.go +++ b/streams_map_outgoing_generic.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) //go:generate genny -in $GOFILE -out streams_map_outgoing_bidi.go gen "item=streamI Item=BidiStream" diff --git a/streams_map_outgoing_generic_test.go b/streams_map_outgoing_generic_test.go index 231f8cfe..78d6eab8 100644 --- a/streams_map_outgoing_generic_test.go +++ b/streams_map_outgoing_generic_test.go @@ -5,8 +5,8 @@ import ( "github.com/golang/mock/gomock" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/streams_map_outgoing_uni.go b/streams_map_outgoing_uni.go index 34243887..92a69afa 100644 --- a/streams_map_outgoing_uni.go +++ b/streams_map_outgoing_uni.go @@ -9,8 +9,8 @@ import ( "sync" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" ) type outgoingUniStreamsMap struct { diff --git a/streams_map_test.go b/streams_map_test.go index db6dac38..5c9e5781 100644 --- a/streams_map_test.go +++ b/streams_map_test.go @@ -10,8 +10,8 @@ import ( "github.com/lucas-clemente/quic-go/internal/handshake" "github.com/lucas-clemente/quic-go/internal/mocks" "github.com/lucas-clemente/quic-go/internal/protocol" + "github.com/lucas-clemente/quic-go/internal/qerr" "github.com/lucas-clemente/quic-go/internal/wire" - "github.com/lucas-clemente/quic-go/qerr" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega"