Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cmd): extract rpc cmds #2706

Merged
merged 10 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/celestia/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ var bridgeCmd = &cobra.Command{
Args: cobra.NoArgs,
Short: "Manage your Bridge node",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
return persistentPreRunEnv(cmd, node.Bridge, args)
return cmdnode.PersistentPreRunEnv(cmd, node.Bridge, args)
},
}
20 changes: 20 additions & 0 deletions cmd/celestia/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,23 @@ func TestBridge(t *testing.T) {
})
*/
}

func parseSignatureForHelpstring(methodSig reflect.StructField) string {
simplifiedSignature := "("
in, out := methodSig.Type.NumIn(), methodSig.Type.NumOut()
for i := 1; i < in; i++ {
simplifiedSignature += methodSig.Type.In(i).String()
if i != in-1 {
simplifiedSignature += ", "
}
}
simplifiedSignature += ") -> ("
for i := 0; i < out-1; i++ {
simplifiedSignature += methodSig.Type.Out(i).String()
if i != out-2 {
simplifiedSignature += ", "
}
}
simplifiedSignature += ")"
return simplifiedSignature
}
27 changes: 0 additions & 27 deletions cmd/celestia/das.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/celestia/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ var fullCmd = &cobra.Command{
Args: cobra.NoArgs,
Short: "Manage your Full node",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
return persistentPreRunEnv(cmd, node.Full, args)
return cmdnode.PersistentPreRunEnv(cmd, node.Full, args)
},
}
2 changes: 1 addition & 1 deletion cmd/celestia/light.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ var lightCmd = &cobra.Command{
Args: cobra.NoArgs,
Short: "Manage your Light node",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
return persistentPreRunEnv(cmd, node.Light, args)
return cmdnode.PersistentPreRunEnv(cmd, node.Light, args)
},
}
Loading