From 195ddb43bb24279c9eaa802a41b9279df34033b7 Mon Sep 17 00:00:00 2001 From: robotomize Date: Fri, 11 Jun 2021 11:27:20 +0300 Subject: [PATCH] ref: moving auxiliary data structures to the package root --- internal/alert/alert.go | 2 +- internal/dispatcher/manager.go | 2 +- internal/predictor/knn/avlnode/time_datapoint.go | 2 +- internal/predictor/knn/brute/brute.go | 4 ++-- internal/predictor/knn/gbkd/gbkd.go | 4 ++-- internal/scrape/scrape.go | 2 +- pkg/{container => }/avltree/node.go | 0 pkg/{container => }/avltree/tree.go | 0 pkg/{container => }/iqueue/queue.go | 0 pkg/{container => }/kdtree/node.go | 0 pkg/{container => }/kdtree/tree.go | 2 +- pkg/{container => }/pqueue/queue.go | 0 pkg/{container => }/rworker/rworker.go | 0 13 files changed, 9 insertions(+), 9 deletions(-) rename pkg/{container => }/avltree/node.go (100%) rename pkg/{container => }/avltree/tree.go (100%) rename pkg/{container => }/iqueue/queue.go (100%) rename pkg/{container => }/kdtree/node.go (100%) rename pkg/{container => }/kdtree/tree.go (98%) rename pkg/{container => }/pqueue/queue.go (100%) rename pkg/{container => }/rworker/rworker.go (100%) diff --git a/internal/alert/alert.go b/internal/alert/alert.go index faf13b9..8520380 100644 --- a/internal/alert/alert.go +++ b/internal/alert/alert.go @@ -19,7 +19,7 @@ import ( "github.com/go-sod/sod/internal/httputil" "github.com/go-sod/sod/internal/logging" metricModel "github.com/go-sod/sod/internal/metric/model" - "github.com/go-sod/sod/pkg/container/rworker" + "github.com/go-sod/sod/pkg/rworker" ) type ProvideFn = func(chan<- error) (Manager, error) diff --git a/internal/dispatcher/manager.go b/internal/dispatcher/manager.go index 05e9a29..11f3e75 100755 --- a/internal/dispatcher/manager.go +++ b/internal/dispatcher/manager.go @@ -13,7 +13,7 @@ import ( metricDb "github.com/go-sod/sod/internal/metric/database" "github.com/go-sod/sod/internal/metric/model" "github.com/go-sod/sod/internal/predictor" - "github.com/go-sod/sod/pkg/container/iqueue" + "github.com/go-sod/sod/pkg/iqueue" ) // Contract for returning the Manager instance diff --git a/internal/predictor/knn/avlnode/time_datapoint.go b/internal/predictor/knn/avlnode/time_datapoint.go index 63c066a..9d88a59 100644 --- a/internal/predictor/knn/avlnode/time_datapoint.go +++ b/internal/predictor/knn/avlnode/time_datapoint.go @@ -4,7 +4,7 @@ import ( "time" "github.com/go-sod/sod/internal/predictor" - "github.com/go-sod/sod/pkg/container/avltree" + "github.com/go-sod/sod/pkg/avltree" ) type TimeNode struct { diff --git a/internal/predictor/knn/brute/brute.go b/internal/predictor/knn/brute/brute.go index 700f214..a0e9a56 100644 --- a/internal/predictor/knn/brute/brute.go +++ b/internal/predictor/knn/brute/brute.go @@ -8,8 +8,8 @@ import ( "github.com/go-sod/sod/internal/predictor" "github.com/go-sod/sod/internal/predictor/knn/avlnode" - "github.com/go-sod/sod/pkg/container/avltree" - "github.com/go-sod/sod/pkg/container/pqueue" + "github.com/go-sod/sod/pkg/avltree" + "github.com/go-sod/sod/pkg/pqueue" ) func WithMaxItems(n int) Option { diff --git a/internal/predictor/knn/gbkd/gbkd.go b/internal/predictor/knn/gbkd/gbkd.go index b168a6b..baa34ec 100644 --- a/internal/predictor/knn/gbkd/gbkd.go +++ b/internal/predictor/knn/gbkd/gbkd.go @@ -8,8 +8,8 @@ import ( "github.com/go-sod/sod/internal/predictor" "github.com/go-sod/sod/internal/predictor/knn/avlnode" - "github.com/go-sod/sod/pkg/container/avltree" - "github.com/go-sod/sod/pkg/container/kdtree" + "github.com/go-sod/sod/pkg/avltree" + "github.com/go-sod/sod/pkg/kdtree" ) func WithMaxItems(n int) Option { diff --git a/internal/scrape/scrape.go b/internal/scrape/scrape.go index e2ee8f4..c92e75d 100644 --- a/internal/scrape/scrape.go +++ b/internal/scrape/scrape.go @@ -18,7 +18,7 @@ import ( "github.com/go-sod/sod/internal/geom" "github.com/go-sod/sod/internal/logging" "github.com/go-sod/sod/internal/metric/model" - "github.com/go-sod/sod/pkg/container/rworker" + "github.com/go-sod/sod/pkg/rworker" ) type response struct { diff --git a/pkg/container/avltree/node.go b/pkg/avltree/node.go similarity index 100% rename from pkg/container/avltree/node.go rename to pkg/avltree/node.go diff --git a/pkg/container/avltree/tree.go b/pkg/avltree/tree.go similarity index 100% rename from pkg/container/avltree/tree.go rename to pkg/avltree/tree.go diff --git a/pkg/container/iqueue/queue.go b/pkg/iqueue/queue.go similarity index 100% rename from pkg/container/iqueue/queue.go rename to pkg/iqueue/queue.go diff --git a/pkg/container/kdtree/node.go b/pkg/kdtree/node.go similarity index 100% rename from pkg/container/kdtree/node.go rename to pkg/kdtree/node.go diff --git a/pkg/container/kdtree/tree.go b/pkg/kdtree/tree.go similarity index 98% rename from pkg/container/kdtree/tree.go rename to pkg/kdtree/tree.go index 706415a..9db0b25 100644 --- a/pkg/container/kdtree/tree.go +++ b/pkg/kdtree/tree.go @@ -21,7 +21,7 @@ import ( "math" "sort" - "github.com/go-sod/sod/pkg/container/pqueue" + "github.com/go-sod/sod/pkg/pqueue" ) type Point interface { diff --git a/pkg/container/pqueue/queue.go b/pkg/pqueue/queue.go similarity index 100% rename from pkg/container/pqueue/queue.go rename to pkg/pqueue/queue.go diff --git a/pkg/container/rworker/rworker.go b/pkg/rworker/rworker.go similarity index 100% rename from pkg/container/rworker/rworker.go rename to pkg/rworker/rworker.go