A bit of niceness: more hints for first-time user.

This commit is contained in:
Andrey Smirnov
2014-01-10 13:21:37 +04:00
parent 356187f3ae
commit 01338d6037
6 changed files with 40 additions and 16 deletions
+12 -7
View File
@@ -53,16 +53,21 @@ func aptlySnapshotList(cmd *commander.Command, args []string) error {
return err
}
fmt.Printf("List of snapshots:\n")
snapshotCollection := debian.NewSnapshotCollection(context.database)
snapshotCollection.ForEach(func(snapshot *debian.Snapshot) error {
fmt.Printf(" * %s\n", snapshot)
return nil
})
fmt.Printf("\nTo get more information about snapshot, run `aptly snapshot show <name>`.\n")
if snapshotCollection.Len() > 0 {
fmt.Printf("List of snapshots:\n")
snapshotCollection.ForEach(func(snapshot *debian.Snapshot) error {
fmt.Printf(" * %s\n", snapshot)
return nil
})
fmt.Printf("\nTo get more information about snapshot, run `aptly snapshot show <name>`.\n")
} else {
fmt.Printf("\nNo snapshots found, create one with `aptly snapshot create...`.\n")
}
return err
}
func aptlySnapshotShow(cmd *commander.Command, args []string) error {