From 938b79720b2d597f284e87eeea4b125ddd33091c Mon Sep 17 00:00:00 2001 From: vvol Date: Thu, 9 Apr 2020 17:29:48 +0200 Subject: [PATCH] Change main.go Dirs --- run_api.sh | 2 +- run_tests.sh | 3 ++- src/config/config.go | 6 +++--- src/config/config_test.go | 2 +- go.mod => src/go.mod | 3 +-- go.sum => src/go.sum | 0 src/handlers/consensus_handler_test.go | 2 +- main.go => src/main.go | 0 8 files changed, 9 insertions(+), 9 deletions(-) rename go.mod => src/go.mod (95%) rename go.sum => src/go.sum (100%) rename main.go => src/main.go (100%) diff --git a/run_api.sh b/run_api.sh index b5025c5..a72a535 100755 --- a/run_api.sh +++ b/run_api.sh @@ -1,2 +1,2 @@ - +cd src go run main.go diff --git a/run_tests.sh b/run_tests.sh index 2c12519..9b0a1cc 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -1 +1,2 @@ -go test ./src/handlers ./src/config ./src/rpc -v \ No newline at end of file +cd src +go test ./handlers ./config ./rpc -v \ No newline at end of file diff --git a/src/config/config.go b/src/config/config.go index d72017f..004f722 100644 --- a/src/config/config.go +++ b/src/config/config.go @@ -11,9 +11,9 @@ var ( confMain ini.Config confNodes ini.Config confSentry ini.Config - mainConfigFile = "config/user_config_main.ini" - nodesFile = "config/user_config_nodes.ini" - sentryFile = "config/user_config_sentry.ini" + mainConfigFile = "../config/user_config_main.ini" + nodesFile = "../config/user_config_nodes.ini" + sentryFile = "../config/user_config_sentry.ini" ) // SetSentryFile sets file location containing sentry data diff --git a/src/config/config_test.go b/src/config/config_test.go index b7b6d97..7e29e31 100644 --- a/src/config/config_test.go +++ b/src/config/config_test.go @@ -24,7 +24,7 @@ func TestMain(m *testing.M) { } func setup() { - os.Chdir("../../") + os.Chdir("../") // Set Logger that will be used by API through all packages lgr.SetLogger(os.Stdout, os.Stdout, os.Stderr) diff --git a/go.mod b/src/go.mod similarity index 95% rename from go.mod rename to src/go.mod index 8676963..6abacaf 100644 --- a/go.mod +++ b/src/go.mod @@ -1,4 +1,4 @@ -module github.com/SimplyVC/oasis_api_server +module github.com/SimplyVC/oasis_api_server/src go 1.13 @@ -45,7 +45,6 @@ require ( github.com/tendermint/tendermint v0.32.8 github.com/tendermint/tm-db v0.2.0 github.com/thepudds/fzgo v0.2.2 - github.com/therecipe/qt v0.0.0-20200126204426-5074eb6d8c41 // indirect github.com/uber/jaeger-client-go v2.16.0+incompatible github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc github.com/zondax/ledger-oasis-go v0.3.0 diff --git a/go.sum b/src/go.sum similarity index 100% rename from go.sum rename to src/go.sum diff --git a/src/handlers/consensus_handler_test.go b/src/handlers/consensus_handler_test.go index 49a68be..20f89c0 100644 --- a/src/handlers/consensus_handler_test.go +++ b/src/handlers/consensus_handler_test.go @@ -33,7 +33,7 @@ func setup() { // Set Logger that will be used by API through all packages // And Load all configuration that need to be used by router - os.Chdir("../../") + os.Chdir("../") lgr.SetLogger(os.Stdout, os.Stdout, os.Stderr) conf.LoadMainConfiguration() conf.LoadNodesConfiguration() diff --git a/main.go b/src/main.go similarity index 100% rename from main.go rename to src/main.go