Skip to content

Commit

Permalink
about/help: provide more diagnostic information
Browse files Browse the repository at this point in the history
Provide by default information like Go version, commit hash,
OS which is usually neglected during bug reports and has
to be reminded to the issue reporters.
  • Loading branch information
Emmanuel Odeke committed Apr 2, 2015
1 parent 2bacd75 commit 8b36577
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/help.go
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 8b36577

Please sign in to comment.