diff --git a/contribs/gnohealth/health.go b/contribs/gnohealth/health.go deleted file mode 100644 index 5118cac5fa5..00000000000 --- a/contribs/gnohealth/health.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "github.com/gnolang/gno/contribs/gnohealth/internal/timestamp" - "github.com/gnolang/gno/tm2/pkg/commands" -) - -func newHealthCmd(io commands.IO) *commands.Command { - cmd := commands.NewCommand( - commands.Metadata{ - ShortUsage: " [flags] [...]", - ShortHelp: "gno health check suite", - LongHelp: "Gno health check suite, to verify that different parts of Gno are working correctly", - }, - commands.NewEmptyConfig(), - commands.HelpExec, - ) - - cmd.AddSubCommands( - timestamp.NewTimestampCmd(io), - ) - - return cmd -} diff --git a/contribs/gnohealth/internal/timestamp/timestamp.go b/contribs/gnohealth/internal/timestamp/timestamp.go index 50521b9130f..cb5dab44f91 100644 --- a/contribs/gnohealth/internal/timestamp/timestamp.go +++ b/contribs/gnohealth/internal/timestamp/timestamp.go @@ -35,7 +35,7 @@ func NewTimestampCmd(io commands.IO) *commands.Command { return commands.NewCommand( commands.Metadata{ Name: "timestamp", - ShortUsage: "[flags]", + ShortUsage: "timestamp [flags]", ShortHelp: "check if block timestamps are drifting", LongHelp: "This command checks if block timestamps are drifting on a blockchain by connecting to a specified node via RPC.", }, diff --git a/contribs/gnohealth/main.go b/contribs/gnohealth/main.go index 4325c657976..a4a23369710 100644 --- a/contribs/gnohealth/main.go +++ b/contribs/gnohealth/main.go @@ -4,11 +4,24 @@ import ( "context" "os" + "github.com/gnolang/gno/contribs/gnohealth/internal/timestamp" "github.com/gnolang/gno/tm2/pkg/commands" ) func main() { - cmd := newHealthCmd(commands.NewDefaultIO()) + cmd := commands.NewCommand( + commands.Metadata{ + ShortUsage: " [flags]", + LongHelp: "Gno health check suite, to verify that different parts of Gno are working correctly", + }, + commands.NewEmptyConfig(), + commands.HelpExec, + ) + + io := commands.NewDefaultIO() + cmd.AddSubCommands( + timestamp.NewTimestampCmd(io), + ) cmd.Execute(context.Background(), os.Args[1:]) }