-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
help.go
41 lines (32 loc) · 868 Bytes
/
help.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Package help is the help subcommand of the influxd command.
package help
import (
"fmt"
"io"
"os"
"strings"
)
// Command displays help for command-line sub-commands.
type Command struct {
Stdout io.Writer
}
// NewCommand returns a new instance of Command.
func NewCommand() *Command {
return &Command{
Stdout: os.Stdout,
}
}
// Run executes the command.
func (cmd *Command) Run(args ...string) error {
fmt.Fprintln(cmd.Stdout, strings.TrimSpace(usage))
return nil
}
const usage = `
Tools for managing and querying InfluxDB data.
Usage: influx-tools command [arguments]
The commands are:
export reshapes existing shards to a new shard duration
compact-shard fully compacts the specified shard
help display this help message
Use "influx-tools command -help" for more information about a command.
`