Skip to content

Commit

Permalink
feat - mysql top
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Strappazzon C committed Nov 17, 2023
1 parent 82ac1d4 commit 7f0c661
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mysql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package mysql

import (
"zenit/mysql/digest"
"zenit/mysql/top"

"github.com/spf13/cobra"
)
Expand All @@ -16,6 +17,7 @@ func NewCommand() *cobra.Command {
}

cmd.AddCommand(digest.NewCommand())
cmd.AddCommand(top.NewCommand())

return cmd
}
21 changes: 21 additions & 0 deletions mysql/top/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package top

import (
"github.com/spf13/cobra"
)

func NewCommand() *cobra.Command {
var cmd = &cobra.Command{
Use: "top [IDENTIFIER]",
Short: "Display MySQL server performance info like 'top'.",
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
cmd.Help()
return
}

},
}

return cmd
}

0 comments on commit 7f0c661

Please sign in to comment.