Skip to content

Commit

Permalink
Merge pull request #144 from odeke-em/more-version-info
Browse files Browse the repository at this point in the history
about/help: provide more diagnostic information
  • Loading branch information
Emmanuel Odeke committed Apr 3, 2015
2 parents 0ff7f48 + 8b36577 commit 7dbd8bf
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ package drive

import (
"fmt"

"github.com/odeke-em/xon/pkger/src"
)

const (
Expand Down Expand Up @@ -45,10 +47,11 @@ const (
UnpubKey = "unpub"
VersionKey = "version"

ForceKey = "force"
QuietKey = "quiet"
QuitShortKey = "q"
QuitLongKey = "quit"
ForceKey = "force"
QuietKey = "quiet"
QuitShortKey = "q"
QuitLongKey = "quit"
DriveRepoRelPath = "github.com/odeke-em/drive"
)

const (
Expand Down Expand Up @@ -184,7 +187,12 @@ func ShowAllDescriptions() {
}

func PrintVersion() {
fmt.Printf("drive version %s\n", Version)
fmt.Printf("drive version %s", Version)
pkgInfo, err := pkger.Recon(DriveRepoRelPath)
if err == nil && pkgInfo != nil {
fmt.Printf("\n%s", pkgInfo)
}
fmt.Println()
}

func ShowDescription(topic string) {
Expand Down

0 comments on commit 7dbd8bf

Please sign in to comment.