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

bugfix: modify volume inspect docs #1029

Merged
merged 1 commit into from
Apr 3, 2018
Merged
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
25 changes: 17 additions & 8 deletions cli/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Removed: pouch-volume`
}

// volumeInspectDescription is used to describe volume inspect command in detail and auto generate command doc.
var volumeInspectDescription = "Inspect a volume in pouchd. " +
var volumeInspectDescription = "Inspect one or more volumes in pouchd. " +
"It must specify volume's name."

// VolumeInspectCommand is used to implement 'volume inspect' command.
Expand All @@ -223,8 +223,8 @@ type VolumeInspectCommand struct {
func (v *VolumeInspectCommand) Init(c *Cli) {
v.cli = c
v.cmd = &cobra.Command{
Use: "inspect [OPTIONS] NAME",
Short: "Inspect a pouch volume",
Use: "inspect [OPTIONS] Volume [Volume...]",
Short: "Inspect one or more pouch volumes",
Long: volumeInspectDescription,
Args: cobra.MinimumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -255,11 +255,20 @@ func (v *VolumeInspectCommand) runVolumeInspect(args []string) error {
// volumeInspectExample shows examples in volume inspect command, and is used in auto-generated cli docs.
func volumeInspectExample() string {
return `$ pouch volume inspect pouch-volume
Mountpoint: /mnt/local/pouch-volume
Name: pouch-volume
Scope:
CreatedAt: 2018-1-17 14:09:30
Driver: local`
{
"CreatedAt": "2018-4-2 14:33:45",
"Driver": "local",
"Labels": {
"backend": "local",
"hostname": "ubuntu"
},
"Mountpoint": "/mnt/local/pouch-volume",
"Name": "pouch-volume",
"Status": {
"sifter": "Default",
"size": "10g"
}
}`
}

// volumeListDescription is used to describe volume list command in detail and auto generate command doc.
Expand Down