From de19ef3b59c8d249a59fc84d6ae2159264c5db5a Mon Sep 17 00:00:00 2001 From: shamaton Date: Mon, 7 Sep 2026 08:22:26 +0900 Subject: [PATCH] fix: Move internal-only time package under internal (#62) --- internal/decoding/ext.go | 2 +- internal/decoding/ext_test.go | 2 +- internal/encoding/ext.go | 2 +- internal/encoding/ext_test.go | 2 +- internal/stream/decoding/ext.go | 2 +- internal/stream/decoding/ext_test.go | 2 +- internal/stream/encoding/ext.go | 2 +- internal/stream/encoding/ext_test.go | 2 +- {time => internal/time}/decode.go | 0 {time => internal/time}/decode_stream.go | 0 {time => internal/time}/decode_stream_test.go | 0 {time => internal/time}/decode_test.go | 0 {time => internal/time}/encode.go | 0 {time => internal/time}/encode_stream.go | 0 {time => internal/time}/encode_stream_test.go | 0 {time => internal/time}/encode_test.go | 0 {time => internal/time}/time.go | 0 msgpack.go | 2 +- msgpack_test.go | 2 +- 19 files changed, 10 insertions(+), 10 deletions(-) rename {time => internal/time}/decode.go (100%) rename {time => internal/time}/decode_stream.go (100%) rename {time => internal/time}/decode_stream_test.go (100%) rename {time => internal/time}/decode_test.go (100%) rename {time => internal/time}/encode.go (100%) rename {time => internal/time}/encode_stream.go (100%) rename {time => internal/time}/encode_stream_test.go (100%) rename {time => internal/time}/encode_test.go (100%) rename {time => internal/time}/time.go (100%) diff --git a/internal/decoding/ext.go b/internal/decoding/ext.go index 987b896..8ff0f50 100644 --- a/internal/decoding/ext.go +++ b/internal/decoding/ext.go @@ -6,7 +6,7 @@ import ( "github.com/shamaton/msgpack/v3/def" "github.com/shamaton/msgpack/v3/ext" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) var ( diff --git a/internal/decoding/ext_test.go b/internal/decoding/ext_test.go index 162de0c..d5ca17f 100644 --- a/internal/decoding/ext_test.go +++ b/internal/decoding/ext_test.go @@ -6,7 +6,7 @@ import ( "github.com/shamaton/msgpack/v3/def" tu "github.com/shamaton/msgpack/v3/internal/common/testutil" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) func Test_AddExtDecoder(t *testing.T) { diff --git a/internal/encoding/ext.go b/internal/encoding/ext.go index 16e6a0a..b0c2376 100644 --- a/internal/encoding/ext.go +++ b/internal/encoding/ext.go @@ -7,7 +7,7 @@ import ( "github.com/shamaton/msgpack/v3/def" "github.com/shamaton/msgpack/v3/ext" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) type extEncoderRegistry struct { diff --git a/internal/encoding/ext_test.go b/internal/encoding/ext_test.go index f778273..2213fae 100644 --- a/internal/encoding/ext_test.go +++ b/internal/encoding/ext_test.go @@ -6,7 +6,7 @@ import ( "github.com/shamaton/msgpack/v3/ext" tu "github.com/shamaton/msgpack/v3/internal/common/testutil" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) func Test_AddExtEncoder(t *testing.T) { diff --git a/internal/stream/decoding/ext.go b/internal/stream/decoding/ext.go index d74bb9d..a3bcb9b 100644 --- a/internal/stream/decoding/ext.go +++ b/internal/stream/decoding/ext.go @@ -7,7 +7,7 @@ import ( "github.com/shamaton/msgpack/v3/def" "github.com/shamaton/msgpack/v3/ext" "github.com/shamaton/msgpack/v3/internal/common/decodingutil" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) var ( diff --git a/internal/stream/decoding/ext_test.go b/internal/stream/decoding/ext_test.go index 624d0c1..b010272 100644 --- a/internal/stream/decoding/ext_test.go +++ b/internal/stream/decoding/ext_test.go @@ -7,7 +7,7 @@ import ( "github.com/shamaton/msgpack/v3/def" "github.com/shamaton/msgpack/v3/internal/common" tu "github.com/shamaton/msgpack/v3/internal/common/testutil" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) func Test_AddExtDecoder(t *testing.T) { diff --git a/internal/stream/encoding/ext.go b/internal/stream/encoding/ext.go index c5a7459..a6d582b 100644 --- a/internal/stream/encoding/ext.go +++ b/internal/stream/encoding/ext.go @@ -6,7 +6,7 @@ import ( "sync/atomic" "github.com/shamaton/msgpack/v3/ext" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) type extEncoderRegistry struct { diff --git a/internal/stream/encoding/ext_test.go b/internal/stream/encoding/ext_test.go index 8924595..a2b0f9a 100644 --- a/internal/stream/encoding/ext_test.go +++ b/internal/stream/encoding/ext_test.go @@ -6,7 +6,7 @@ import ( "github.com/shamaton/msgpack/v3/ext" tu "github.com/shamaton/msgpack/v3/internal/common/testutil" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) func Test_AddExtEncoder(t *testing.T) { diff --git a/time/decode.go b/internal/time/decode.go similarity index 100% rename from time/decode.go rename to internal/time/decode.go diff --git a/time/decode_stream.go b/internal/time/decode_stream.go similarity index 100% rename from time/decode_stream.go rename to internal/time/decode_stream.go diff --git a/time/decode_stream_test.go b/internal/time/decode_stream_test.go similarity index 100% rename from time/decode_stream_test.go rename to internal/time/decode_stream_test.go diff --git a/time/decode_test.go b/internal/time/decode_test.go similarity index 100% rename from time/decode_test.go rename to internal/time/decode_test.go diff --git a/time/encode.go b/internal/time/encode.go similarity index 100% rename from time/encode.go rename to internal/time/encode.go diff --git a/time/encode_stream.go b/internal/time/encode_stream.go similarity index 100% rename from time/encode_stream.go rename to internal/time/encode_stream.go diff --git a/time/encode_stream_test.go b/internal/time/encode_stream_test.go similarity index 100% rename from time/encode_stream_test.go rename to internal/time/encode_stream_test.go diff --git a/time/encode_test.go b/internal/time/encode_test.go similarity index 100% rename from time/encode_test.go rename to internal/time/encode_test.go diff --git a/time/time.go b/internal/time/time.go similarity index 100% rename from time/time.go rename to internal/time/time.go diff --git a/msgpack.go b/msgpack.go index 0527239..879033b 100644 --- a/msgpack.go +++ b/msgpack.go @@ -10,7 +10,7 @@ import ( "github.com/shamaton/msgpack/v3/internal/encoding" streamdecoding "github.com/shamaton/msgpack/v3/internal/stream/decoding" streamencoding "github.com/shamaton/msgpack/v3/internal/stream/encoding" - "github.com/shamaton/msgpack/v3/time" + "github.com/shamaton/msgpack/v3/internal/time" ) // StructAsArray is encoding option. diff --git a/msgpack_test.go b/msgpack_test.go index 71a3b0e..dfd2266 100644 --- a/msgpack_test.go +++ b/msgpack_test.go @@ -19,7 +19,7 @@ import ( "github.com/shamaton/msgpack/v3/def" "github.com/shamaton/msgpack/v3/ext" tu "github.com/shamaton/msgpack/v3/internal/common/testutil" - extTime "github.com/shamaton/msgpack/v3/time" + extTime "github.com/shamaton/msgpack/v3/internal/time" ) var now time.Time