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

chore: fix gnohealth command/subcommand help #3555

Merged
merged 3 commits into from
Jan 20, 2025
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
24 changes: 0 additions & 24 deletions contribs/gnohealth/health.go

This file was deleted.

2 changes: 1 addition & 1 deletion contribs/gnohealth/internal/timestamp/timestamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
},
Expand Down
15 changes: 14 additions & 1 deletion contribs/gnohealth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<subcommand> [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:])
}
Loading