aptly version command.

This commit is contained in:
Andrey Smirnov
2013-12-30 16:41:28 +04:00
parent a36ac3b877
commit 07891c1660
2 changed files with 31 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"fmt"
"github.com/gonuts/commander"
"github.com/gonuts/flag"
)
func aptlyVersion(cmd *commander.Command, args []string) error {
fmt.Printf("aptly version: %s\n", Version)
return nil
}
func makeCmdVersion() *commander.Command {
return &commander.Command{
Run: aptlyVersion,
UsageLine: "version",
Short: "display version",
Long: `
Shows aptly version.
ex:
$ aptly version
`,
Flag: *flag.NewFlagSet("aptly-version", flag.ExitOnError),
}
}