From c0b09c8646235c7487c6e8b13f152c3e3e7a9c22 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 7 Jun 2017 13:07:53 +0200 Subject: [PATCH 1/2] make utils an internal package --- ackhandler/received_packet_history.go | 2 +- ackhandler/received_packet_history_test.go | 2 +- ackhandler/sent_packet_handler.go | 2 +- client.go | 2 +- congestion/cubic.go | 2 +- congestion/cubic_sender.go | 2 +- congestion/hybrid_slow_start.go | 2 +- congestion/prr_sender.go | 2 +- congestion/prr_sender_test.go | 2 +- congestion/rtt_stats.go | 2 +- congestion/rtt_stats_test.go | 2 +- crypto/cert_compression.go | 2 +- crypto/key_derivation.go | 2 +- example/client/main.go | 2 +- example/main.go | 2 +- flowcontrol/flow_control_manager.go | 2 +- flowcontrol/flow_controller.go | 2 +- frames/ack_frame.go | 2 +- frames/blocked_frame.go | 2 +- frames/connection_close_frame.go | 2 +- frames/goaway_frame.go | 2 +- frames/log.go | 2 +- frames/log_test.go | 2 +- frames/rst_stream_frame.go | 2 +- frames/stop_waiting_frame.go | 2 +- frames/stream_frame.go | 2 +- frames/window_update_frame.go | 2 +- h2quic/client.go | 2 +- h2quic/request_writer.go | 2 +- h2quic/response_writer.go | 2 +- h2quic/server.go | 2 +- handshake/connection_parameters_manager.go | 2 +- handshake/crypto_setup_client.go | 2 +- handshake/crypto_setup_client_test.go | 2 +- handshake/crypto_setup_server.go | 2 +- handshake/crypto_setup_server_test.go | 2 +- handshake/ephermal_cache.go | 2 +- handshake/handshake_message.go | 2 +- handshake/server_config_client.go | 2 +- integrationtests/handshake/rtt.go | 2 +- integrationtests/integrationtests_suite_test.go | 2 +- {utils => internal/utils}/_gen.go | 0 {utils => internal/utils}/atomic_bool.go | 0 {utils => internal/utils}/atomic_bool_test.go | 0 {utils => internal/utils}/byteinterval_linkedlist.go | 0 {utils => internal/utils}/connection_id.go | 0 {utils => internal/utils}/connection_id_test.go | 0 {utils => internal/utils}/float16.go | 0 {utils => internal/utils}/float16_test.go | 0 {utils => internal/utils}/host.go | 0 {utils => internal/utils}/host_test.go | 0 {utils => internal/utils}/log.go | 0 {utils => internal/utils}/log_test.go | 0 {utils => internal/utils}/minmax.go | 0 {utils => internal/utils}/minmax_test.go | 0 {utils => internal/utils}/packet_interval.go | 0 {utils => internal/utils}/packetinterval_linkedlist.go | 0 {utils => internal/utils}/streamframe_interval.go | 0 {utils => internal/utils}/timer.go | 0 {utils => internal/utils}/timer_test.go | 0 {utils => internal/utils}/utils.go | 0 {utils => internal/utils}/utils_suite_test.go | 0 {utils => internal/utils}/utils_test.go | 0 public_header.go | 2 +- public_reset.go | 2 +- qerr/quic_error.go | 2 +- server.go | 2 +- server_test.go | 2 +- session.go | 2 +- stream.go | 2 +- stream_frame_sorter.go | 2 +- stream_frame_sorter_test.go | 2 +- stream_framer.go | 2 +- stream_test.go | 1 - 74 files changed, 51 insertions(+), 52 deletions(-) rename {utils => internal/utils}/_gen.go (100%) rename {utils => internal/utils}/atomic_bool.go (100%) rename {utils => internal/utils}/atomic_bool_test.go (100%) rename {utils => internal/utils}/byteinterval_linkedlist.go (100%) rename {utils => internal/utils}/connection_id.go (100%) rename {utils => internal/utils}/connection_id_test.go (100%) rename {utils => internal/utils}/float16.go (100%) rename {utils => internal/utils}/float16_test.go (100%) rename {utils => internal/utils}/host.go (100%) rename {utils => internal/utils}/host_test.go (100%) rename {utils => internal/utils}/log.go (100%) rename {utils => internal/utils}/log_test.go (100%) rename {utils => internal/utils}/minmax.go (100%) rename {utils => internal/utils}/minmax_test.go (100%) rename {utils => internal/utils}/packet_interval.go (100%) rename {utils => internal/utils}/packetinterval_linkedlist.go (100%) rename {utils => internal/utils}/streamframe_interval.go (100%) rename {utils => internal/utils}/timer.go (100%) rename {utils => internal/utils}/timer_test.go (100%) rename {utils => internal/utils}/utils.go (100%) rename {utils => internal/utils}/utils_suite_test.go (100%) rename {utils => internal/utils}/utils_test.go (100%) diff --git a/ackhandler/received_packet_history.go b/ackhandler/received_packet_history.go index d45fe6fd..65968f3a 100644 --- a/ackhandler/received_packet_history.go +++ b/ackhandler/received_packet_history.go @@ -4,7 +4,7 @@ import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type receivedPacketHistory struct { diff --git a/ackhandler/received_packet_history_test.go b/ackhandler/received_packet_history_test.go index 0f794e1e..7d397475 100644 --- a/ackhandler/received_packet_history_test.go +++ b/ackhandler/received_packet_history_test.go @@ -3,7 +3,7 @@ package ackhandler import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/ackhandler/sent_packet_handler.go b/ackhandler/sent_packet_handler.go index 3e371703..3a07972e 100644 --- a/ackhandler/sent_packet_handler.go +++ b/ackhandler/sent_packet_handler.go @@ -9,7 +9,7 @@ import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) const ( diff --git a/client.go b/client.go index f9dddcd3..3bf686f7 100644 --- a/client.go +++ b/client.go @@ -11,7 +11,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type client struct { diff --git a/congestion/cubic.go b/congestion/cubic.go index 44595f02..62e73556 100644 --- a/congestion/cubic.go +++ b/congestion/cubic.go @@ -4,8 +4,8 @@ import ( "math" "time" + "github.com/lucas-clemente/quic-go/internal/utils" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" ) // This cubic implementation is based on the one found in Chromiums's QUIC diff --git a/congestion/cubic_sender.go b/congestion/cubic_sender.go index 34947d34..8982b87a 100644 --- a/congestion/cubic_sender.go +++ b/congestion/cubic_sender.go @@ -4,7 +4,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) const ( diff --git a/congestion/hybrid_slow_start.go b/congestion/hybrid_slow_start.go index 29204ff2..179252b3 100644 --- a/congestion/hybrid_slow_start.go +++ b/congestion/hybrid_slow_start.go @@ -4,7 +4,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // Note(pwestin): the magic clamping numbers come from the original code in diff --git a/congestion/prr_sender.go b/congestion/prr_sender.go index f8e6d59c..272f84ea 100644 --- a/congestion/prr_sender.go +++ b/congestion/prr_sender.go @@ -4,7 +4,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // PrrSender implements the Proportional Rate Reduction (PRR) per RFC 6937 diff --git a/congestion/prr_sender_test.go b/congestion/prr_sender_test.go index 0a6aa630..61e6a17d 100644 --- a/congestion/prr_sender_test.go +++ b/congestion/prr_sender_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/gomega" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) var _ = Describe("PRR sender", func() { diff --git a/congestion/rtt_stats.go b/congestion/rtt_stats.go index 0bf7b05d..546c1cb9 100644 --- a/congestion/rtt_stats.go +++ b/congestion/rtt_stats.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) const ( diff --git a/congestion/rtt_stats_test.go b/congestion/rtt_stats_test.go index 3b722a60..6fae2795 100644 --- a/congestion/rtt_stats_test.go +++ b/congestion/rtt_stats_test.go @@ -3,7 +3,7 @@ package congestion import ( "time" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/crypto/cert_compression.go b/crypto/cert_compression.go index 04b00f26..ea5ecff3 100644 --- a/crypto/cert_compression.go +++ b/crypto/cert_compression.go @@ -9,7 +9,7 @@ import ( "fmt" "hash/fnv" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type entryType uint8 diff --git a/crypto/key_derivation.go b/crypto/key_derivation.go index 470137f7..33ca8235 100644 --- a/crypto/key_derivation.go +++ b/crypto/key_derivation.go @@ -6,7 +6,7 @@ import ( "io" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" "golang.org/x/crypto/hkdf" ) diff --git a/example/client/main.go b/example/client/main.go index 21bc5cef..39aa2ed7 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -8,7 +8,7 @@ import ( "sync" "github.com/lucas-clemente/quic-go/h2quic" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) func main() { diff --git a/example/main.go b/example/main.go index 63f63bb5..d6f330fc 100644 --- a/example/main.go +++ b/example/main.go @@ -18,7 +18,7 @@ import ( _ "net/http/pprof" "github.com/lucas-clemente/quic-go/h2quic" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type binds []string diff --git a/flowcontrol/flow_control_manager.go b/flowcontrol/flow_control_manager.go index c5b4e754..a1043a00 100644 --- a/flowcontrol/flow_control_manager.go +++ b/flowcontrol/flow_control_manager.go @@ -9,7 +9,7 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type flowControlManager struct { diff --git a/flowcontrol/flow_controller.go b/flowcontrol/flow_controller.go index e0946779..a031ed54 100644 --- a/flowcontrol/flow_controller.go +++ b/flowcontrol/flow_controller.go @@ -7,7 +7,7 @@ import ( "github.com/lucas-clemente/quic-go/congestion" "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type flowController struct { diff --git a/frames/ack_frame.go b/frames/ack_frame.go index 83f7e317..42a8bfef 100644 --- a/frames/ack_frame.go +++ b/frames/ack_frame.go @@ -6,7 +6,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) var ( diff --git a/frames/blocked_frame.go b/frames/blocked_frame.go index b7e640c0..7285e104 100644 --- a/frames/blocked_frame.go +++ b/frames/blocked_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A BlockedFrame in QUIC diff --git a/frames/connection_close_frame.go b/frames/connection_close_frame.go index 5681414c..9cfaf544 100644 --- a/frames/connection_close_frame.go +++ b/frames/connection_close_frame.go @@ -8,7 +8,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A ConnectionCloseFrame in QUIC diff --git a/frames/goaway_frame.go b/frames/goaway_frame.go index 7d452d5d..4ea5a437 100644 --- a/frames/goaway_frame.go +++ b/frames/goaway_frame.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A GoawayFrame is a GOAWAY frame diff --git a/frames/log.go b/frames/log.go index 1918db18..6b7fdcec 100644 --- a/frames/log.go +++ b/frames/log.go @@ -1,6 +1,6 @@ package frames -import "github.com/lucas-clemente/quic-go/utils" +import "github.com/lucas-clemente/quic-go/internal/utils" // LogFrame logs a frame, either sent or received func LogFrame(frame Frame, sent bool) { diff --git a/frames/log_test.go b/frames/log_test.go index b0bf0c7c..30959ad2 100644 --- a/frames/log_test.go +++ b/frames/log_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/frames/rst_stream_frame.go b/frames/rst_stream_frame.go index 87778754..72d02569 100644 --- a/frames/rst_stream_frame.go +++ b/frames/rst_stream_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A RstStreamFrame in QUIC diff --git a/frames/stop_waiting_frame.go b/frames/stop_waiting_frame.go index 71c7c7de..eb6798f2 100644 --- a/frames/stop_waiting_frame.go +++ b/frames/stop_waiting_frame.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A StopWaitingFrame in QUIC diff --git a/frames/stream_frame.go b/frames/stream_frame.go index 4a78d216..3536147d 100644 --- a/frames/stream_frame.go +++ b/frames/stream_frame.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A StreamFrame of QUIC diff --git a/frames/window_update_frame.go b/frames/window_update_frame.go index 93e7f8c3..c1eb9bf0 100644 --- a/frames/window_update_frame.go +++ b/frames/window_update_frame.go @@ -4,7 +4,7 @@ import ( "bytes" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A WindowUpdateFrame in QUIC diff --git a/h2quic/client.go b/h2quic/client.go index d0bb96cc..d7b93c93 100644 --- a/h2quic/client.go +++ b/h2quic/client.go @@ -17,7 +17,7 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type roundTripperOpts struct { diff --git a/h2quic/request_writer.go b/h2quic/request_writer.go index 834ebbbe..455da6f6 100644 --- a/h2quic/request_writer.go +++ b/h2quic/request_writer.go @@ -14,7 +14,7 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type requestWriter struct { diff --git a/h2quic/response_writer.go b/h2quic/response_writer.go index d38555a4..add157c8 100644 --- a/h2quic/response_writer.go +++ b/h2quic/response_writer.go @@ -9,7 +9,7 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" ) diff --git a/h2quic/server.go b/h2quic/server.go index f5b1e1b6..b998efb7 100644 --- a/h2quic/server.go +++ b/h2quic/server.go @@ -15,7 +15,7 @@ import ( quic "github.com/lucas-clemente/quic-go" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" "golang.org/x/net/http2" "golang.org/x/net/http2/hpack" ) diff --git a/handshake/connection_parameters_manager.go b/handshake/connection_parameters_manager.go index fc712185..1127471b 100644 --- a/handshake/connection_parameters_manager.go +++ b/handshake/connection_parameters_manager.go @@ -7,7 +7,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // ConnectionParametersManager negotiates and stores the connection parameters diff --git a/handshake/crypto_setup_client.go b/handshake/crypto_setup_client.go index 76ae41f7..d45496bb 100644 --- a/handshake/crypto_setup_client.go +++ b/handshake/crypto_setup_client.go @@ -14,7 +14,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type cryptoSetupClient struct { diff --git a/handshake/crypto_setup_client_test.go b/handshake/crypto_setup_client_test.go index 706ddfc0..2fc2bfc4 100644 --- a/handshake/crypto_setup_client_test.go +++ b/handshake/crypto_setup_client_test.go @@ -10,7 +10,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/handshake/crypto_setup_server.go b/handshake/crypto_setup_server.go index 68d50a16..52a9f9ab 100644 --- a/handshake/crypto_setup_server.go +++ b/handshake/crypto_setup_server.go @@ -12,7 +12,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // KeyDerivationFunction is used for key derivation diff --git a/handshake/crypto_setup_server_test.go b/handshake/crypto_setup_server_test.go index ea5b04dd..62cf054a 100644 --- a/handshake/crypto_setup_server_test.go +++ b/handshake/crypto_setup_server_test.go @@ -9,7 +9,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/handshake/ephermal_cache.go b/handshake/ephermal_cache.go index dacf3a11..608cf0d0 100644 --- a/handshake/ephermal_cache.go +++ b/handshake/ephermal_cache.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) var ( diff --git a/handshake/handshake_message.go b/handshake/handshake_message.go index 0a0de79e..804dcd02 100644 --- a/handshake/handshake_message.go +++ b/handshake/handshake_message.go @@ -9,7 +9,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A HandshakeMessage is a handshake message diff --git a/handshake/server_config_client.go b/handshake/server_config_client.go index e3ee4f7d..3de6f08e 100644 --- a/handshake/server_config_client.go +++ b/handshake/server_config_client.go @@ -9,7 +9,7 @@ import ( "github.com/lucas-clemente/quic-go/crypto" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type serverConfigClient struct { diff --git a/integrationtests/handshake/rtt.go b/integrationtests/handshake/rtt.go index fe125eb1..33c7ff76 100644 --- a/integrationtests/handshake/rtt.go +++ b/integrationtests/handshake/rtt.go @@ -11,7 +11,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" "github.com/lucas-clemente/quic-go/testdata" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/integrationtests/integrationtests_suite_test.go b/integrationtests/integrationtests_suite_test.go index d6e579e3..4319fd15 100644 --- a/integrationtests/integrationtests_suite_test.go +++ b/integrationtests/integrationtests_suite_test.go @@ -24,7 +24,7 @@ import ( "github.com/lucas-clemente/quic-go/h2quic" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/testdata" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" "github.com/tebeka/selenium" . "github.com/onsi/ginkgo" diff --git a/utils/_gen.go b/internal/utils/_gen.go similarity index 100% rename from utils/_gen.go rename to internal/utils/_gen.go diff --git a/utils/atomic_bool.go b/internal/utils/atomic_bool.go similarity index 100% rename from utils/atomic_bool.go rename to internal/utils/atomic_bool.go diff --git a/utils/atomic_bool_test.go b/internal/utils/atomic_bool_test.go similarity index 100% rename from utils/atomic_bool_test.go rename to internal/utils/atomic_bool_test.go diff --git a/utils/byteinterval_linkedlist.go b/internal/utils/byteinterval_linkedlist.go similarity index 100% rename from utils/byteinterval_linkedlist.go rename to internal/utils/byteinterval_linkedlist.go diff --git a/utils/connection_id.go b/internal/utils/connection_id.go similarity index 100% rename from utils/connection_id.go rename to internal/utils/connection_id.go diff --git a/utils/connection_id_test.go b/internal/utils/connection_id_test.go similarity index 100% rename from utils/connection_id_test.go rename to internal/utils/connection_id_test.go diff --git a/utils/float16.go b/internal/utils/float16.go similarity index 100% rename from utils/float16.go rename to internal/utils/float16.go diff --git a/utils/float16_test.go b/internal/utils/float16_test.go similarity index 100% rename from utils/float16_test.go rename to internal/utils/float16_test.go diff --git a/utils/host.go b/internal/utils/host.go similarity index 100% rename from utils/host.go rename to internal/utils/host.go diff --git a/utils/host_test.go b/internal/utils/host_test.go similarity index 100% rename from utils/host_test.go rename to internal/utils/host_test.go diff --git a/utils/log.go b/internal/utils/log.go similarity index 100% rename from utils/log.go rename to internal/utils/log.go diff --git a/utils/log_test.go b/internal/utils/log_test.go similarity index 100% rename from utils/log_test.go rename to internal/utils/log_test.go diff --git a/utils/minmax.go b/internal/utils/minmax.go similarity index 100% rename from utils/minmax.go rename to internal/utils/minmax.go diff --git a/utils/minmax_test.go b/internal/utils/minmax_test.go similarity index 100% rename from utils/minmax_test.go rename to internal/utils/minmax_test.go diff --git a/utils/packet_interval.go b/internal/utils/packet_interval.go similarity index 100% rename from utils/packet_interval.go rename to internal/utils/packet_interval.go diff --git a/utils/packetinterval_linkedlist.go b/internal/utils/packetinterval_linkedlist.go similarity index 100% rename from utils/packetinterval_linkedlist.go rename to internal/utils/packetinterval_linkedlist.go diff --git a/utils/streamframe_interval.go b/internal/utils/streamframe_interval.go similarity index 100% rename from utils/streamframe_interval.go rename to internal/utils/streamframe_interval.go diff --git a/utils/timer.go b/internal/utils/timer.go similarity index 100% rename from utils/timer.go rename to internal/utils/timer.go diff --git a/utils/timer_test.go b/internal/utils/timer_test.go similarity index 100% rename from utils/timer_test.go rename to internal/utils/timer_test.go diff --git a/utils/utils.go b/internal/utils/utils.go similarity index 100% rename from utils/utils.go rename to internal/utils/utils.go diff --git a/utils/utils_suite_test.go b/internal/utils/utils_suite_test.go similarity index 100% rename from utils/utils_suite_test.go rename to internal/utils/utils_suite_test.go diff --git a/utils/utils_test.go b/internal/utils/utils_test.go similarity index 100% rename from utils/utils_test.go rename to internal/utils/utils_test.go diff --git a/public_header.go b/public_header.go index 5aa036f3..80c81685 100644 --- a/public_header.go +++ b/public_header.go @@ -6,7 +6,7 @@ import ( "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) var ( diff --git a/public_reset.go b/public_reset.go index 2cbd9888..ae1bb4f3 100644 --- a/public_reset.go +++ b/public_reset.go @@ -7,7 +7,7 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type publicReset struct { diff --git a/qerr/quic_error.go b/qerr/quic_error.go index 6259476b..f581ab14 100644 --- a/qerr/quic_error.go +++ b/qerr/quic_error.go @@ -3,7 +3,7 @@ package qerr import ( "fmt" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // ErrorCode can be used as a normal error without reason. diff --git a/server.go b/server.go index fe5817a5..c373e99a 100644 --- a/server.go +++ b/server.go @@ -11,7 +11,7 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // packetHandler handles packets diff --git a/server_test.go b/server_test.go index 35df8d31..6d2892ad 100644 --- a/server_test.go +++ b/server_test.go @@ -12,7 +12,7 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" diff --git a/session.go b/session.go index dfffccd4..6772c9cf 100644 --- a/session.go +++ b/session.go @@ -14,7 +14,7 @@ import ( "github.com/lucas-clemente/quic-go/handshake" "github.com/lucas-clemente/quic-go/protocol" "github.com/lucas-clemente/quic-go/qerr" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type unpacker interface { diff --git a/stream.go b/stream.go index 5e2cbaf8..72bbb591 100644 --- a/stream.go +++ b/stream.go @@ -8,7 +8,7 @@ import ( "github.com/lucas-clemente/quic-go/flowcontrol" "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) // A Stream assembles the data from StreamFrames and provides a super-convenient Read-Interface diff --git a/stream_frame_sorter.go b/stream_frame_sorter.go index 8db048cc..f24324a1 100644 --- a/stream_frame_sorter.go +++ b/stream_frame_sorter.go @@ -5,7 +5,7 @@ import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type streamFrameSorter struct { diff --git a/stream_frame_sorter_test.go b/stream_frame_sorter_test.go index 79962bed..1e0333a1 100644 --- a/stream_frame_sorter_test.go +++ b/stream_frame_sorter_test.go @@ -5,7 +5,7 @@ import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) diff --git a/stream_framer.go b/stream_framer.go index 45c07220..337ba72e 100644 --- a/stream_framer.go +++ b/stream_framer.go @@ -4,7 +4,7 @@ import ( "github.com/lucas-clemente/quic-go/flowcontrol" "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/protocol" - "github.com/lucas-clemente/quic-go/utils" + "github.com/lucas-clemente/quic-go/internal/utils" ) type streamFramer struct { diff --git a/stream_test.go b/stream_test.go index fd716432..34d894b1 100644 --- a/stream_test.go +++ b/stream_test.go @@ -8,7 +8,6 @@ import ( "github.com/lucas-clemente/quic-go/frames" "github.com/lucas-clemente/quic-go/internal/mocks/mocks_fc" "github.com/lucas-clemente/quic-go/protocol" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) From 21553272e7f93fc636eaac0ecd1cd16328081998 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Fri, 9 Jun 2017 22:30:19 +0200 Subject: [PATCH 2/2] fix Codecov for the internal package --- .travis/after_success.sh | 3 +-- codecov.yml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis/after_success.sh b/.travis/after_success.sh index 4c914a9f..994bb1a3 100755 --- a/.travis/after_success.sh +++ b/.travis/after_success.sh @@ -3,7 +3,6 @@ set -e if [ ${TESTMODE} == "unit" ]; then - cat quic-go.coverprofile > coverage.txt - cat */*.coverprofile >> coverage.txt + cat `find . -name "*.coverprofile"` > coverage.txt bash <(curl -s https://codecov.io/bash) -f coverage.txt fi diff --git a/codecov.yml b/codecov.yml index 8fa7519a..d85e7810 100644 --- a/codecov.yml +++ b/codecov.yml @@ -4,8 +4,8 @@ coverage: - ackhandler/packet_linkedlist.go - h2quic/gzipreader.go - h2quic/response.go - - utils/byteinterval_linkedlist.go - - utils/packetinterval_linkedlist.go + - internal/utils/byteinterval_linkedlist.go + - internal/utils/packetinterval_linkedlist.go status: project: default: