From 40fba2434097d9ca4273f4372b311e77831655f4 Mon Sep 17 00:00:00 2001 From: Shreyas S Bhat <35568964+shreyasbhat0@users.noreply.github.com> Date: Wed, 21 Feb 2024 09:03:43 +0530 Subject: [PATCH] fix: module name dive (#365) --- cli/cmd/bridge/bridge.go | 6 +++--- cli/cmd/bridge/btp/cmd.go | 4 ++-- cli/cmd/bridge/btp/run.go | 12 ++++++------ cli/cmd/bridge/ibc/cmd.go | 4 ++-- cli/cmd/bridge/ibc/run.go | 6 +++--- cli/cmd/bridge/utils/types.go | 4 ++-- cli/cmd/chains/archway/cmd.go | 2 +- cli/cmd/chains/archway/run.go | 6 +++--- cli/cmd/chains/chains.go | 16 ++++++++-------- cli/cmd/chains/eth/cmd.go | 2 +- cli/cmd/chains/eth/run.go | 2 +- cli/cmd/chains/hardhat/cmd.go | 4 ++-- cli/cmd/chains/hardhat/run.go | 4 ++-- cli/cmd/chains/icon/cmd.go | 4 ++-- cli/cmd/chains/icon/run.go | 4 ++-- cli/cmd/chains/kusama/cmd.go | 4 ++-- cli/cmd/chains/kusama/run.go | 4 ++-- cli/cmd/chains/neutron/cmd.go | 2 +- cli/cmd/chains/neutron/run.go | 4 ++-- cli/cmd/chains/polkadot/cmd.go | 4 ++-- cli/cmd/chains/polkadot/run.go | 4 ++-- cli/cmd/chains/utils/types.go | 19 +++++++++---------- cli/cmd/root.go | 12 ++++++------ cli/cmd/social/discord.go | 2 +- cli/cmd/social/twitter.go | 2 +- cli/cmd/utility/clean.go | 2 +- cli/cmd/utility/enclaves.go | 2 +- cli/cmd/utility/tutorial.go | 2 +- cli/cmd/utility/version.go | 2 +- cli/go.mod | 4 ++-- cli/main.go | 2 +- test/functional/dive_test.go | 4 ++-- 32 files changed, 77 insertions(+), 78 deletions(-) diff --git a/cli/cmd/bridge/bridge.go b/cli/cmd/bridge/bridge.go index a66d055b..07b66add 100644 --- a/cli/cmd/bridge/bridge.go +++ b/cli/cmd/bridge/bridge.go @@ -4,9 +4,9 @@ import ( "os" "slices" - "github.com/hugobyte/dive-core/cli/cmd/bridge/btp" - "github.com/hugobyte/dive-core/cli/cmd/bridge/ibc" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/bridge/btp" + "github.com/hugobyte/dive/cli/cmd/bridge/ibc" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/bridge/btp/cmd.go b/cli/cmd/bridge/btp/cmd.go index b4112e41..afda8b1a 100644 --- a/cli/cmd/bridge/btp/cmd.go +++ b/cli/cmd/bridge/btp/cmd.go @@ -3,8 +3,8 @@ package btp import ( "fmt" - "github.com/hugobyte/dive-core/cli/cmd/bridge/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/bridge/utils" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/bridge/btp/run.go b/cli/cmd/bridge/btp/run.go index bec14415..c41db87e 100644 --- a/cli/cmd/bridge/btp/run.go +++ b/cli/cmd/bridge/btp/run.go @@ -4,13 +4,13 @@ import ( "fmt" "strconv" - chainutil "github.com/hugobyte/dive-core/cli/cmd/chains/utils" + chainutil "github.com/hugobyte/dive/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/cmd/bridge/utils" - "github.com/hugobyte/dive-core/cli/cmd/chains/eth" - "github.com/hugobyte/dive-core/cli/cmd/chains/hardhat" - "github.com/hugobyte/dive-core/cli/cmd/chains/icon" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/bridge/utils" + "github.com/hugobyte/dive/cli/cmd/chains/eth" + "github.com/hugobyte/dive/cli/cmd/chains/hardhat" + "github.com/hugobyte/dive/cli/cmd/chains/icon" + "github.com/hugobyte/dive/cli/common" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" ) diff --git a/cli/cmd/bridge/ibc/cmd.go b/cli/cmd/bridge/ibc/cmd.go index c039aac1..2a6f01e7 100644 --- a/cli/cmd/bridge/ibc/cmd.go +++ b/cli/cmd/bridge/ibc/cmd.go @@ -3,7 +3,7 @@ package ibc import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) @@ -56,6 +56,6 @@ func ibcRelay(cmd *cobra.Command, args []string) { if err != nil { cliContext.Fatal(err) } - + cliContext.StopSpinnerIfNotVerbose(fmt.Sprintf("IBC Setup Completed between %s and %s. Please find the service details in the output folder present in current working directory - (output/%s/%s)\n", chainA, chainB, common.EnclaveName, serviceFileName), common.DiveLogs) } diff --git a/cli/cmd/bridge/ibc/run.go b/cli/cmd/bridge/ibc/run.go index 19610f13..55a4aa84 100644 --- a/cli/cmd/bridge/ibc/run.go +++ b/cli/cmd/bridge/ibc/run.go @@ -3,10 +3,10 @@ package ibc import ( "fmt" - chainutil "github.com/hugobyte/dive-core/cli/cmd/chains/utils" + chainutil "github.com/hugobyte/dive/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/cmd/bridge/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/bridge/utils" + "github.com/hugobyte/dive/cli/common" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" ) diff --git a/cli/cmd/bridge/utils/types.go b/cli/cmd/bridge/utils/types.go index a5e9f8f9..2c0d792a 100644 --- a/cli/cmd/bridge/utils/types.go +++ b/cli/cmd/bridge/utils/types.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" ) const ( @@ -58,7 +58,7 @@ func (chains *Chains) GetIbcRelayParams(src_service_config string, dst_service_c func (chains *Chains) GetServicesResponse(cli *common.Cli) (string, string, error) { var serviceConfig = common.Services{} - + shortUuid, err := cli.Context().GetShortUuid(common.EnclaveName) if err != nil { return "", "", fmt.Errorf("failed to get short uuid of enclave") diff --git a/cli/cmd/chains/archway/cmd.go b/cli/cmd/chains/archway/cmd.go index 9675dead..21e370ae 100644 --- a/cli/cmd/chains/archway/cmd.go +++ b/cli/cmd/chains/archway/cmd.go @@ -3,7 +3,7 @@ package archway import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/archway/run.go b/cli/cmd/chains/archway/run.go index dacdc98f..234a0f3c 100644 --- a/cli/cmd/chains/archway/run.go +++ b/cli/cmd/chains/archway/run.go @@ -1,8 +1,8 @@ package archway import ( - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" ) func RunArchway(cli *common.Cli) (*common.DiveServiceResponse, error) { @@ -21,7 +21,7 @@ func RunArchway(cli *common.Cli) (*common.DiveServiceResponse, error) { if err != nil { return nil, err } - + encodedServiceConfigDataString, err := serviceConfig.EncodeToString() if err != nil { diff --git a/cli/cmd/chains/chains.go b/cli/cmd/chains/chains.go index 2fad03d3..79beefcc 100644 --- a/cli/cmd/chains/chains.go +++ b/cli/cmd/chains/chains.go @@ -4,14 +4,14 @@ import ( "os" "slices" - "github.com/hugobyte/dive-core/cli/cmd/chains/archway" - "github.com/hugobyte/dive-core/cli/cmd/chains/eth" - "github.com/hugobyte/dive-core/cli/cmd/chains/hardhat" - "github.com/hugobyte/dive-core/cli/cmd/chains/icon" - "github.com/hugobyte/dive-core/cli/cmd/chains/kusama" - "github.com/hugobyte/dive-core/cli/cmd/chains/neutron" - "github.com/hugobyte/dive-core/cli/cmd/chains/polkadot" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/archway" + "github.com/hugobyte/dive/cli/cmd/chains/eth" + "github.com/hugobyte/dive/cli/cmd/chains/hardhat" + "github.com/hugobyte/dive/cli/cmd/chains/icon" + "github.com/hugobyte/dive/cli/cmd/chains/kusama" + "github.com/hugobyte/dive/cli/cmd/chains/neutron" + "github.com/hugobyte/dive/cli/cmd/chains/polkadot" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/eth/cmd.go b/cli/cmd/chains/eth/cmd.go index 3cc17423..af66d2a4 100644 --- a/cli/cmd/chains/eth/cmd.go +++ b/cli/cmd/chains/eth/cmd.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/eth/run.go b/cli/cmd/chains/eth/run.go index 066d80f8..2c0cf696 100644 --- a/cli/cmd/chains/eth/run.go +++ b/cli/cmd/chains/eth/run.go @@ -1,7 +1,7 @@ package eth import ( - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" ) func RunEth(cli *common.Cli) (*common.DiveServiceResponse, error) { diff --git a/cli/cmd/chains/hardhat/cmd.go b/cli/cmd/chains/hardhat/cmd.go index 02851c31..6c7508b9 100644 --- a/cli/cmd/chains/hardhat/cmd.go +++ b/cli/cmd/chains/hardhat/cmd.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) @@ -48,7 +48,7 @@ func hardhat(cmd *cobra.Command, args []string) { if err != nil { cliContext.Fatal(err) } - + stopMessage := fmt.Sprintf("Hardhat Node Started. Please find the service details in the output folder present in current working directory - (output/%s/%s)\n", common.EnclaveName, serviceFileName) cliContext.StopSpinnerIfNotVerbose(stopMessage, common.DiveLogs) } diff --git a/cli/cmd/chains/hardhat/run.go b/cli/cmd/chains/hardhat/run.go index ee1da56f..b0cd26d4 100644 --- a/cli/cmd/chains/hardhat/run.go +++ b/cli/cmd/chains/hardhat/run.go @@ -1,8 +1,8 @@ package hardhat import ( - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" ) func RunHardhat(cli *common.Cli) (*common.DiveServiceResponse, error) { diff --git a/cli/cmd/chains/icon/cmd.go b/cli/cmd/chains/icon/cmd.go index 1a87373e..01669fa4 100644 --- a/cli/cmd/chains/icon/cmd.go +++ b/cli/cmd/chains/icon/cmd.go @@ -3,7 +3,7 @@ package icon import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) @@ -97,7 +97,7 @@ func icon(cmd *cobra.Command, args []string) { cliContext.Context().Exit(1) } - + stopMessage := fmt.Sprintf("Icon Node Started. Please find the service details in the output folder present in current working directory - (output/%s/%s)\n", common.EnclaveName, serviceFileName) cliContext.StopSpinnerIfNotVerbose(stopMessage, common.DiveLogs) } diff --git a/cli/cmd/chains/icon/run.go b/cli/cmd/chains/icon/run.go index ec9e12eb..5641e76e 100644 --- a/cli/cmd/chains/icon/run.go +++ b/cli/cmd/chains/icon/run.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" ) diff --git a/cli/cmd/chains/kusama/cmd.go b/cli/cmd/chains/kusama/cmd.go index c6fcc39a..0910bb36 100644 --- a/cli/cmd/chains/kusama/cmd.go +++ b/cli/cmd/chains/kusama/cmd.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/kusama/run.go b/cli/cmd/chains/kusama/run.go index c9187a49..523ec703 100644 --- a/cli/cmd/chains/kusama/run.go +++ b/cli/cmd/chains/kusama/run.go @@ -8,8 +8,8 @@ import ( "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/starlark_run_config" - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" ) const ( diff --git a/cli/cmd/chains/neutron/cmd.go b/cli/cmd/chains/neutron/cmd.go index 31dcdd14..fecc6375 100644 --- a/cli/cmd/chains/neutron/cmd.go +++ b/cli/cmd/chains/neutron/cmd.go @@ -3,7 +3,7 @@ package neutron import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/neutron/run.go b/cli/cmd/chains/neutron/run.go index e45f33b9..6a04cce0 100644 --- a/cli/cmd/chains/neutron/run.go +++ b/cli/cmd/chains/neutron/run.go @@ -1,8 +1,8 @@ package neutron import ( - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" ) func RunNeutron(cli *common.Cli) (*common.DiveServiceResponse, error) { diff --git a/cli/cmd/chains/polkadot/cmd.go b/cli/cmd/chains/polkadot/cmd.go index 696bcf48..1b652b25 100644 --- a/cli/cmd/chains/polkadot/cmd.go +++ b/cli/cmd/chains/polkadot/cmd.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/chains/polkadot/run.go b/cli/cmd/chains/polkadot/run.go index 5158cc56..b4dc502f 100644 --- a/cli/cmd/chains/polkadot/run.go +++ b/cli/cmd/chains/polkadot/run.go @@ -8,8 +8,8 @@ import ( "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/starlark_run_config" - "github.com/hugobyte/dive-core/cli/cmd/chains/utils" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/chains/utils" + "github.com/hugobyte/dive/cli/common" ) const ( diff --git a/cli/cmd/chains/utils/types.go b/cli/cmd/chains/utils/types.go index 93b55ff5..32734720 100644 --- a/cli/cmd/chains/utils/types.go +++ b/cli/cmd/chains/utils/types.go @@ -6,7 +6,7 @@ import ( "path/filepath" "slices" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" ) type CosmosServiceConfig struct { @@ -219,18 +219,17 @@ type RelayChainConfig struct { } type ParaNodeConfig struct { - Name string `json:"name"` - Nodes []NodeConfig `json:"nodes"` - SudoKey Key `json:"sudo_key,omitempty"` - + Name string `json:"name"` + Nodes []NodeConfig `json:"nodes"` + SudoKey Key `json:"sudo_key,omitempty"` } type PolkadotServiceConfig struct { - ChainType string `json:"chain_type"` - RelayChain RelayChainConfig `json:"relaychain"` - Para []ParaNodeConfig `json:"parachains"` - Explorer bool `json:"explorer"` - WithoutRegistration bool `json:"without_registration"` + ChainType string `json:"chain_type"` + RelayChain RelayChainConfig `json:"relaychain"` + Para []ParaNodeConfig `json:"parachains"` + Explorer bool `json:"explorer"` + WithoutRegistration bool `json:"without_registration"` } func (pc *ParaNodeConfig) EncodeToString() (string, error) { diff --git a/cli/cmd/root.go b/cli/cmd/root.go index 75f1402d..16f739e2 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -3,12 +3,12 @@ package cmd import ( "os" - "github.com/hugobyte/dive-core/cli/cmd/bridge" - "github.com/hugobyte/dive-core/cli/cmd/chains" - "github.com/hugobyte/dive-core/cli/cmd/social" - "github.com/hugobyte/dive-core/cli/cmd/utility" - "github.com/hugobyte/dive-core/cli/common" - "github.com/hugobyte/dive-core/cli/styles" + "github.com/hugobyte/dive/cli/cmd/bridge" + "github.com/hugobyte/dive/cli/cmd/chains" + "github.com/hugobyte/dive/cli/cmd/social" + "github.com/hugobyte/dive/cli/cmd/utility" + "github.com/hugobyte/dive/cli/common" + "github.com/hugobyte/dive/cli/styles" "github.com/spf13/cobra" ) diff --git a/cli/cmd/social/discord.go b/cli/cmd/social/discord.go index 68b8e599..f89f3a48 100644 --- a/cli/cmd/social/discord.go +++ b/cli/cmd/social/discord.go @@ -1,7 +1,7 @@ package social import ( - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/social/twitter.go b/cli/cmd/social/twitter.go index 7a9d72cf..44dc7554 100644 --- a/cli/cmd/social/twitter.go +++ b/cli/cmd/social/twitter.go @@ -3,7 +3,7 @@ package social import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/utility/clean.go b/cli/cmd/utility/clean.go index 90365811..b8f72666 100644 --- a/cli/cmd/utility/clean.go +++ b/cli/cmd/utility/clean.go @@ -3,7 +3,7 @@ package utility import ( "fmt" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/utility/enclaves.go b/cli/cmd/utility/enclaves.go index ed505012..656bdebd 100644 --- a/cli/cmd/utility/enclaves.go +++ b/cli/cmd/utility/enclaves.go @@ -5,7 +5,7 @@ import ( "os" "text/tabwriter" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/utility/tutorial.go b/cli/cmd/utility/tutorial.go index ed748d06..45b29a7d 100644 --- a/cli/cmd/utility/tutorial.go +++ b/cli/cmd/utility/tutorial.go @@ -1,7 +1,7 @@ package utility import ( - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/cmd/utility/version.go b/cli/cmd/utility/version.go index 0ee0b7ef..3dbb1275 100644 --- a/cli/cmd/utility/version.go +++ b/cli/cmd/utility/version.go @@ -10,7 +10,7 @@ import ( "github.com/fatih/color" "github.com/google/go-github/github" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/common" "github.com/spf13/cobra" ) diff --git a/cli/go.mod b/cli/go.mod index 128f2ab8..bc6ffa88 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -1,4 +1,4 @@ -module github.com/hugobyte/dive-core/cli +module github.com/hugobyte/dive/cli go 1.21.4 @@ -26,7 +26,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240124210655-a35e0a2cee4b // indirect + github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240124210655-a35e0a2cee4b github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.5.1 // indirect github.com/stretchr/testify v1.8.4 diff --git a/cli/main.go b/cli/main.go index fc3287cb..0ed8c958 100644 --- a/cli/main.go +++ b/cli/main.go @@ -3,7 +3,7 @@ Copyright © 2023 Hugobyte AI Labs */ package main -import "github.com/hugobyte/dive-core/cli/cmd" +import "github.com/hugobyte/dive/cli/cmd" func main() { diff --git a/test/functional/dive_test.go b/test/functional/dive_test.go index 67c7a267..35b21b13 100644 --- a/test/functional/dive_test.go +++ b/test/functional/dive_test.go @@ -9,8 +9,8 @@ import ( "path/filepath" "testing" - "github.com/hugobyte/dive-core/cli/cmd/utility" - "github.com/hugobyte/dive-core/cli/common" + "github.com/hugobyte/dive/cli/cmd/utility" + "github.com/hugobyte/dive/cli/common" "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega"