| 1 |
|
| 2 |
package help |
| 3 |
|
| 4 |
import ( |
| 5 |
"fmt" |
| 6 |
"io" |
| 7 |
"os" |
| 8 |
"strings" |
| 9 |
) |
| 10 |
|
| 11 |
|
| 12 |
type Command struct { |
| 13 |
Stdout io.Writer |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
func NewCommand() *Command { |
| 18 |
return &Command{ |
| 19 |
Stdout: os.Stdout, |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
func (cmd *Command) Run(args ...string) error { |
| 25 |
fmt.Fprintln(cmd.Stdout, strings.TrimSpace(usage)) |
| 26 |
return nil |
| 27 |
} |
| 28 |
|
| 29 |
const usage = ` |
| 30 |
Tools for managing and querying InfluxDB data. |
| 31 |
|
| 32 |
Usage: influx-tools command [arguments] |
| 33 |
|
| 34 |
The commands are: |
| 35 |
|
| 36 |
export downloads a snapshot of a data node and saves it to disk |
| 37 |
help display this help message |
| 38 |
|
| 39 |
Use "influx-tools command -help" for more information about a command. |
| 40 |
` |