diff --git a/Makefile b/Makefile index 6d26a39b..f995156d 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,10 @@ endif PROMU_TEST_CONF ?= .promu-go-test.yml ifeq ($(CGO_BUILD), 1) PROMU_CONF ?= .promu-cgo.yml - pkgs := ./pkg/api/cli \ + pkgs := ./pkg/sqlite3 ./pkg/api/cli \ ./pkg/api/db ./pkg/api/helper \ ./pkg/api/resource ./pkg/api/resource/slurm \ - ./pkg/api/updater ./pkg/api/db/sqlite3 \ + ./pkg/api/updater \ ./pkg/api/http ./cmd/ceems_api_server \ ./pkg/lb/backend ./pkg/lb/cli \ ./pkg/lb/frontend ./pkg/lb/serverpool \ diff --git a/pkg/api/db/db.go b/pkg/api/db/db.go index da496afd..88f730b3 100644 --- a/pkg/api/db/db.go +++ b/pkg/api/db/db.go @@ -15,11 +15,11 @@ import ( "github.com/go-kit/log/level" "github.com/mahendrapaipuri/ceems/internal/common" "github.com/mahendrapaipuri/ceems/pkg/api/base" - ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3" "github.com/mahendrapaipuri/ceems/pkg/api/models" "github.com/mahendrapaipuri/ceems/pkg/api/resource" "github.com/mahendrapaipuri/ceems/pkg/api/updater" "github.com/mahendrapaipuri/ceems/pkg/grafana" + ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/sqlite3" "github.com/mattn/go-sqlite3" "github.com/prometheus/common/model" ) diff --git a/pkg/api/db/helpers.go b/pkg/api/db/helpers.go index 3fb81512..f6a293a5 100644 --- a/pkg/api/db/helpers.go +++ b/pkg/api/db/helpers.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/mahendrapaipuri/ceems/pkg/api/base" - ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3" + ceems_sqlite3 "github.com/mahendrapaipuri/ceems/pkg/sqlite3" ) var ( diff --git a/pkg/api/http/server.go b/pkg/api/http/server.go index d5268e5e..37c4feae 100644 --- a/pkg/api/http/server.go +++ b/pkg/api/http/server.go @@ -22,9 +22,9 @@ import ( "github.com/mahendrapaipuri/ceems/internal/common" "github.com/mahendrapaipuri/ceems/pkg/api/base" "github.com/mahendrapaipuri/ceems/pkg/api/db" - "github.com/mahendrapaipuri/ceems/pkg/api/db/sqlite3" "github.com/mahendrapaipuri/ceems/pkg/api/http/docs" "github.com/mahendrapaipuri/ceems/pkg/api/models" + "github.com/mahendrapaipuri/ceems/pkg/sqlite3" "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/exporter-toolkit/web" diff --git a/pkg/api/db/sqlite3/sqlite3.go b/pkg/sqlite3/sqlite3.go similarity index 99% rename from pkg/api/db/sqlite3/sqlite3.go rename to pkg/sqlite3/sqlite3.go index 7f12d1e8..e147f26b 100644 --- a/pkg/api/db/sqlite3/sqlite3.go +++ b/pkg/sqlite3/sqlite3.go @@ -195,7 +195,7 @@ func avgMetricMap(existing, new string, existingWeight, newWeight float64) strin var metricMaps = []models.MetricMap{existingMetricMap, newMetricMap} var weights = []float64{existingWeight, newWeight} - // Intialize vars + // Initialize vars var avgMetricMap = make(models.MetricMap) var totalWeights = make(map[string]models.JSONFloat) for imetricMap, metricMap := range metricMaps { diff --git a/pkg/api/db/sqlite3/sqlite3_test.go b/pkg/sqlite3/sqlite3_test.go similarity index 100% rename from pkg/api/db/sqlite3/sqlite3_test.go rename to pkg/sqlite3/sqlite3_test.go