diff --git a/asynccache/README.md b/cache/asynccache/README.md similarity index 100% rename from asynccache/README.md rename to cache/asynccache/README.md diff --git a/asynccache/asynccache.go b/cache/asynccache/asynccache.go similarity index 100% rename from asynccache/asynccache.go rename to cache/asynccache/asynccache.go diff --git a/asynccache/asynccache_test.go b/cache/asynccache/asynccache_test.go similarity index 100% rename from asynccache/asynccache_test.go rename to cache/asynccache/asynccache_test.go diff --git a/asynccache/atomic_error.go b/cache/asynccache/atomic_error.go similarity index 100% rename from asynccache/atomic_error.go rename to cache/asynccache/atomic_error.go diff --git a/circuitbreaker/README.MD b/cloud/circuitbreaker/README.MD similarity index 100% rename from circuitbreaker/README.MD rename to cloud/circuitbreaker/README.MD diff --git a/circuitbreaker/breaker.go b/cloud/circuitbreaker/breaker.go similarity index 99% rename from circuitbreaker/breaker.go rename to cloud/circuitbreaker/breaker.go index d54b58d6..528403ac 100644 --- a/circuitbreaker/breaker.go +++ b/cloud/circuitbreaker/breaker.go @@ -18,7 +18,7 @@ import ( "sync/atomic" "time" - "github.com/bytedance/gopkg/syncx" + "github.com/bytedance/gopkg/lang/syncx" ) const ( diff --git a/circuitbreaker/breaker_test.go b/cloud/circuitbreaker/breaker_test.go similarity index 100% rename from circuitbreaker/breaker_test.go rename to cloud/circuitbreaker/breaker_test.go diff --git a/circuitbreaker/circuitbreaker.go b/cloud/circuitbreaker/circuitbreaker.go similarity index 100% rename from circuitbreaker/circuitbreaker.go rename to cloud/circuitbreaker/circuitbreaker.go diff --git a/circuitbreaker/counter.go b/cloud/circuitbreaker/counter.go similarity index 100% rename from circuitbreaker/counter.go rename to cloud/circuitbreaker/counter.go diff --git a/circuitbreaker/counter_test.go b/cloud/circuitbreaker/counter_test.go similarity index 100% rename from circuitbreaker/counter_test.go rename to cloud/circuitbreaker/counter_test.go diff --git a/circuitbreaker/interface.go b/cloud/circuitbreaker/interface.go similarity index 100% rename from circuitbreaker/interface.go rename to cloud/circuitbreaker/interface.go diff --git a/circuitbreaker/metricer.go b/cloud/circuitbreaker/metricer.go similarity index 99% rename from circuitbreaker/metricer.go rename to cloud/circuitbreaker/metricer.go index a1a789bb..f8d7a7cc 100644 --- a/circuitbreaker/metricer.go +++ b/cloud/circuitbreaker/metricer.go @@ -19,7 +19,7 @@ import ( "sync/atomic" "time" - "github.com/bytedance/gopkg/syncx" + "github.com/bytedance/gopkg/lang/syncx" ) // bucket holds counts of failures and successes diff --git a/circuitbreaker/metricer_test.go b/cloud/circuitbreaker/metricer_test.go similarity index 100% rename from circuitbreaker/metricer_test.go rename to cloud/circuitbreaker/metricer_test.go diff --git a/circuitbreaker/panel.go b/cloud/circuitbreaker/panel.go similarity index 100% rename from circuitbreaker/panel.go rename to cloud/circuitbreaker/panel.go diff --git a/circuitbreaker/panel_test.go b/cloud/circuitbreaker/panel_test.go similarity index 100% rename from circuitbreaker/panel_test.go rename to cloud/circuitbreaker/panel_test.go diff --git a/circuitbreaker/per_p_metricer.go b/cloud/circuitbreaker/per_p_metricer.go similarity index 99% rename from circuitbreaker/per_p_metricer.go rename to cloud/circuitbreaker/per_p_metricer.go index 98fd69d8..cf633a04 100644 --- a/circuitbreaker/per_p_metricer.go +++ b/cloud/circuitbreaker/per_p_metricer.go @@ -19,7 +19,7 @@ import ( "sync/atomic" "time" - "github.com/bytedance/gopkg/syncx" + "github.com/bytedance/gopkg/lang/syncx" ) // perPBucket holds counts of failures and successes diff --git a/circuitbreaker/per_p_metricer_test.go b/cloud/circuitbreaker/per_p_metricer_test.go similarity index 100% rename from circuitbreaker/per_p_metricer_test.go rename to cloud/circuitbreaker/per_p_metricer_test.go diff --git a/circuitbreaker/test_helper.go b/cloud/circuitbreaker/test_helper.go similarity index 100% rename from circuitbreaker/test_helper.go rename to cloud/circuitbreaker/test_helper.go diff --git a/circuitbreaker/tripfunc.go b/cloud/circuitbreaker/tripfunc.go similarity index 100% rename from circuitbreaker/tripfunc.go rename to cloud/circuitbreaker/tripfunc.go diff --git a/metainfo/README-CN.md b/cloud/metainfo/README-CN.md similarity index 100% rename from metainfo/README-CN.md rename to cloud/metainfo/README-CN.md diff --git a/metainfo/README.md b/cloud/metainfo/README.md similarity index 100% rename from metainfo/README.md rename to cloud/metainfo/README.md diff --git a/metainfo/backward.go b/cloud/metainfo/backward.go similarity index 100% rename from metainfo/backward.go rename to cloud/metainfo/backward.go diff --git a/metainfo/backward_test.go b/cloud/metainfo/backward_test.go similarity index 98% rename from metainfo/backward_test.go rename to cloud/metainfo/backward_test.go index e566ed91..4e12861d 100644 --- a/metainfo/backward_test.go +++ b/cloud/metainfo/backward_test.go @@ -19,7 +19,7 @@ import ( "fmt" "testing" - "github.com/bytedance/gopkg/metainfo" + "github.com/bytedance/gopkg/cloud/metainfo" ) func calls(ctx context.Context, level int, t *testing.T, expect bool) { diff --git a/metainfo/helper_test.go b/cloud/metainfo/helper_test.go similarity index 100% rename from metainfo/helper_test.go rename to cloud/metainfo/helper_test.go diff --git a/metainfo/info.go b/cloud/metainfo/info.go similarity index 100% rename from metainfo/info.go rename to cloud/metainfo/info.go diff --git a/metainfo/info_test.go b/cloud/metainfo/info_test.go similarity index 99% rename from metainfo/info_test.go rename to cloud/metainfo/info_test.go index 8831ebd2..786a1194 100644 --- a/metainfo/info_test.go +++ b/cloud/metainfo/info_test.go @@ -19,7 +19,7 @@ import ( "fmt" "testing" - "github.com/bytedance/gopkg/metainfo" + "github.com/bytedance/gopkg/cloud/metainfo" ) func TestWithValue(t *testing.T) { diff --git a/metainfo/kv.go b/cloud/metainfo/kv.go similarity index 100% rename from metainfo/kv.go rename to cloud/metainfo/kv.go diff --git a/metainfo/utils.go b/cloud/metainfo/utils.go similarity index 100% rename from metainfo/utils.go rename to cloud/metainfo/utils.go diff --git a/metainfo/utils_test.go b/cloud/metainfo/utils_test.go similarity index 98% rename from metainfo/utils_test.go rename to cloud/metainfo/utils_test.go index 85e423c6..9b470f37 100644 --- a/metainfo/utils_test.go +++ b/cloud/metainfo/utils_test.go @@ -18,7 +18,7 @@ import ( "context" "testing" - "github.com/bytedance/gopkg/metainfo" + "github.com/bytedance/gopkg/cloud/metainfo" ) func TestHasMetaInfo(t *testing.T) { diff --git a/struct/skipset/asm.s b/collection/skipset/asm.s similarity index 100% rename from struct/skipset/asm.s rename to collection/skipset/asm.s diff --git a/struct/skipset/bench.sh b/collection/skipset/bench.sh similarity index 100% rename from struct/skipset/bench.sh rename to collection/skipset/bench.sh diff --git a/struct/skipset/flag.go b/collection/skipset/flag.go similarity index 100% rename from struct/skipset/flag.go rename to collection/skipset/flag.go diff --git a/struct/skipset/flag_test.go b/collection/skipset/flag_test.go similarity index 100% rename from struct/skipset/flag_test.go rename to collection/skipset/flag_test.go diff --git a/struct/skipset/readme.md b/collection/skipset/readme.md similarity index 100% rename from struct/skipset/readme.md rename to collection/skipset/readme.md diff --git a/struct/skipset/skipset.go b/collection/skipset/skipset.go similarity index 100% rename from struct/skipset/skipset.go rename to collection/skipset/skipset.go diff --git a/struct/skipset/skipset_bench_test.go b/collection/skipset/skipset_bench_test.go similarity index 99% rename from struct/skipset/skipset_bench_test.go rename to collection/skipset/skipset_bench_test.go index 9e9e5f84..e52fe796 100644 --- a/struct/skipset/skipset_bench_test.go +++ b/collection/skipset/skipset_bench_test.go @@ -20,7 +20,7 @@ import ( "sync" "testing" - "github.com/bytedance/gopkg/fastrand" + "github.com/bytedance/gopkg/lang/fastrand" ) const initsize = 1 << 10 // for `contains` `1Remove9Add90Contains` `1Range9Remove90Add900Contains` diff --git a/struct/skipset/skipset_str.go b/collection/skipset/skipset_str.go similarity index 100% rename from struct/skipset/skipset_str.go rename to collection/skipset/skipset_str.go diff --git a/struct/skipset/skipset_test.go b/collection/skipset/skipset_test.go similarity index 99% rename from struct/skipset/skipset_test.go rename to collection/skipset/skipset_test.go index dcdb69fa..b66f64d1 100644 --- a/struct/skipset/skipset_test.go +++ b/collection/skipset/skipset_test.go @@ -23,7 +23,7 @@ import ( "sync/atomic" "testing" - "github.com/bytedance/gopkg/fastrand" + "github.com/bytedance/gopkg/lang/fastrand" ) func Example() { diff --git a/struct/skipset/types.go b/collection/skipset/types.go similarity index 100% rename from struct/skipset/types.go rename to collection/skipset/types.go diff --git a/struct/skipset/types_gen.go b/collection/skipset/types_gen.go similarity index 100% rename from struct/skipset/types_gen.go rename to collection/skipset/types_gen.go diff --git a/struct/skipset/util.go b/collection/skipset/util.go similarity index 95% rename from struct/skipset/util.go rename to collection/skipset/util.go index 4cc5e8e6..209967cb 100644 --- a/struct/skipset/util.go +++ b/collection/skipset/util.go @@ -17,7 +17,7 @@ package skipset import ( _ "unsafe" // for linkname - "github.com/bytedance/gopkg/fastrand" + "github.com/bytedance/gopkg/lang/fastrand" ) const ( diff --git a/fastrand/fastrand.go b/lang/fastrand/fastrand.go similarity index 100% rename from fastrand/fastrand.go rename to lang/fastrand/fastrand.go diff --git a/fastrand/fastrand_test.go b/lang/fastrand/fastrand_test.go similarity index 100% rename from fastrand/fastrand_test.go rename to lang/fastrand/fastrand_test.go diff --git a/fastrand/readme.md b/lang/fastrand/readme.md similarity index 100% rename from fastrand/readme.md rename to lang/fastrand/readme.md diff --git a/mcache/README.md b/lang/mcache/README.md similarity index 100% rename from mcache/README.md rename to lang/mcache/README.md diff --git a/mcache/bsr_amd64.go b/lang/mcache/bsr_amd64.go similarity index 100% rename from mcache/bsr_amd64.go rename to lang/mcache/bsr_amd64.go diff --git a/mcache/bsr_amd64.s b/lang/mcache/bsr_amd64.s similarity index 100% rename from mcache/bsr_amd64.s rename to lang/mcache/bsr_amd64.s diff --git a/mcache/bsr_other.go b/lang/mcache/bsr_other.go similarity index 100% rename from mcache/bsr_other.go rename to lang/mcache/bsr_other.go diff --git a/mcache/bsr_test.go b/lang/mcache/bsr_test.go similarity index 100% rename from mcache/bsr_test.go rename to lang/mcache/bsr_test.go diff --git a/mcache/mcache.go b/lang/mcache/mcache.go similarity index 100% rename from mcache/mcache.go rename to lang/mcache/mcache.go diff --git a/mcache/mcache_test.go b/lang/mcache/mcache_test.go similarity index 100% rename from mcache/mcache_test.go rename to lang/mcache/mcache_test.go diff --git a/mcache/utils.go b/lang/mcache/utils.go similarity index 100% rename from mcache/utils.go rename to lang/mcache/utils.go diff --git a/syncx/rwmutex.go b/lang/syncx/rwmutex.go similarity index 100% rename from syncx/rwmutex.go rename to lang/syncx/rwmutex.go diff --git a/gopool/README.md b/util/gopool/README.md similarity index 100% rename from gopool/README.md rename to util/gopool/README.md diff --git a/gopool/config.go b/util/gopool/config.go similarity index 100% rename from gopool/config.go rename to util/gopool/config.go diff --git a/gopool/gopool.go b/util/gopool/gopool.go similarity index 100% rename from gopool/gopool.go rename to util/gopool/gopool.go diff --git a/gopool/pool.go b/util/gopool/pool.go similarity index 100% rename from gopool/pool.go rename to util/gopool/pool.go diff --git a/gopool/pool_test.go b/util/gopool/pool_test.go similarity index 100% rename from gopool/pool_test.go rename to util/gopool/pool_test.go diff --git a/gopool/worker.go b/util/gopool/worker.go similarity index 97% rename from gopool/worker.go rename to util/gopool/worker.go index 101ba58e..16cab103 100644 --- a/gopool/worker.go +++ b/util/gopool/worker.go @@ -20,7 +20,7 @@ import ( "sync" "sync/atomic" - "github.com/bytedance/gopkg/logger" + "github.com/bytedance/gopkg/util/logger" ) var workerPool sync.Pool diff --git a/logger/README.md b/util/logger/README.md similarity index 100% rename from logger/README.md rename to util/logger/README.md diff --git a/logger/default.go b/util/logger/default.go similarity index 100% rename from logger/default.go rename to util/logger/default.go diff --git a/logger/logger.go b/util/logger/logger.go similarity index 100% rename from logger/logger.go rename to util/logger/logger.go