mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Display fs in nomad help and list the subcommands when called
This commit is contained in:
19
command/fs.go
Normal file
19
command/fs.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package command
|
||||
|
||||
import "github.com/mitchellh/cli"
|
||||
|
||||
type FSCommand struct {
|
||||
Meta
|
||||
}
|
||||
|
||||
func (f *FSCommand) Help() string {
|
||||
return "This command is accessed by using one of the subcommands below."
|
||||
}
|
||||
|
||||
func (f *FSCommand) Synopsis() string {
|
||||
return "Inspect the contents of an allocation directory"
|
||||
}
|
||||
|
||||
func (f *FSCommand) Run(args []string) int {
|
||||
return cli.RunResultHelp
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func (f *FSCatCommand) Help() string {
|
||||
}
|
||||
|
||||
func (f *FSCatCommand) Synopsis() string {
|
||||
return "displays a file at a given location"
|
||||
return "Cat a file in an allocation directory"
|
||||
}
|
||||
|
||||
func (f *FSCatCommand) Run(args []string) int {
|
||||
|
||||
@@ -28,7 +28,7 @@ Usage: nomad fs ls <alloc-id> <path>
|
||||
}
|
||||
|
||||
func (f *FSListCommand) Synopsis() string {
|
||||
return "Lists list of files of an allocation directory"
|
||||
return "List files in an allocation directory"
|
||||
}
|
||||
|
||||
func (f *FSListCommand) Run(args []string) int {
|
||||
|
||||
@@ -27,7 +27,7 @@ Usage: nomad fs stat <alloc-id> <path>
|
||||
}
|
||||
|
||||
func (f *FSStatCommand) Synopsis() string {
|
||||
return "Stats an entry in an allocation directory"
|
||||
return "Stat an entry in an allocation directory"
|
||||
}
|
||||
|
||||
func (f *FSStatCommand) Run(args []string) int {
|
||||
|
||||
Reference in New Issue
Block a user