From 78189cc1ea6c465dac90186780a230b5fecada98 Mon Sep 17 00:00:00 2001 From: Amin Talebi Date: Tue, 27 Aug 2024 16:35:43 +0200 Subject: [PATCH] move configs to upper level package --- README.md | 2 +- configs/{deploy => }/config.all.sample.yaml | 0 {internal/configs => configs}/config.go | 0 configs/{deploy => }/config.minimal.sample.yaml | 0 {internal/configs => configs}/default.go | 0 internal/cmd/run/run.go | 6 +++--- 6 files changed, 4 insertions(+), 4 deletions(-) rename configs/{deploy => }/config.all.sample.yaml (100%) rename {internal/configs => configs}/config.go (100%) rename configs/{deploy => }/config.minimal.sample.yaml (100%) rename {internal/configs => configs}/default.go (100%) diff --git a/README.md b/README.md index abfdb9b..13a131d 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Edit `configs/local/config.yaml` and set the necessary values. ### Run Locally: ``` -go run main.go server --config=configs/local/config.yaml +go run main.go run --config=configs/local/config.yaml ``` ## Contributing diff --git a/configs/deploy/config.all.sample.yaml b/configs/config.all.sample.yaml similarity index 100% rename from configs/deploy/config.all.sample.yaml rename to configs/config.all.sample.yaml diff --git a/internal/configs/config.go b/configs/config.go similarity index 100% rename from internal/configs/config.go rename to configs/config.go diff --git a/configs/deploy/config.minimal.sample.yaml b/configs/config.minimal.sample.yaml similarity index 100% rename from configs/deploy/config.minimal.sample.yaml rename to configs/config.minimal.sample.yaml diff --git a/internal/configs/default.go b/configs/default.go similarity index 100% rename from internal/configs/default.go rename to configs/default.go diff --git a/internal/cmd/run/run.go b/internal/cmd/run/run.go index f24ada9..cc49ccd 100644 --- a/internal/cmd/run/run.go +++ b/internal/cmd/run/run.go @@ -13,9 +13,9 @@ import ( "github.com/shopspring/decimal" "github.com/spf13/cobra" - block_ptr "github.com/zarbanio/market-maker-keeper/internal/block-ptr" + "github.com/zarbanio/market-maker-keeper/configs" + blockptr "github.com/zarbanio/market-maker-keeper/internal/block-ptr" "github.com/zarbanio/market-maker-keeper/internal/chain" - "github.com/zarbanio/market-maker-keeper/internal/configs" "github.com/zarbanio/market-maker-keeper/internal/dextrader" "github.com/zarbanio/market-maker-keeper/internal/domain" "github.com/zarbanio/market-maker-keeper/internal/domain/pair" @@ -42,7 +42,7 @@ func main(cfg configs.Config) { log.Panic(err) } - blockPtr := block_ptr.NewDBBlockPointer(postgresStore, cfg.Indexer.StartBlock) + blockPtr := blockptr.NewDBBlockPointer(postgresStore, cfg.Indexer.StartBlock) if !blockPtr.Exists() { logger.Logger.Debug().Msg("block pointer doest not exits. creating a new one") err := blockPtr.Create()