github.com/driusan/bug@v0.3.2-0.20190306121946-d7f4e7f33fea/bugapp/Env.go (about)

     1  package bugapp
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/driusan/bug/bugs"
     6  	"github.com/driusan/bug/scm"
     7  )
     8  
     9  func Env() {
    10  	scm, scmdir, scmerr := scm.DetectSCM(make(map[string]bool))
    11  	fmt.Printf("Settings used by this command:\n")
    12  	fmt.Printf("\nEditor: %s", getEditor())
    13  	fmt.Printf("\nIssues directory: %s", bugs.GetIssuesDir())
    14  
    15  	if scmerr == nil {
    16  		fmt.Printf("\n\nSCM Type:\t%s", scm.GetSCMType())
    17  		fmt.Printf("\n%s directory:\t%s", scm.GetSCMType(), scmdir)
    18  	} else {
    19  		fmt.Printf("\n\nSCM Type: None (purge and commit commands unavailable)")
    20  	}
    21  
    22  	fmt.Printf("\n")
    23  }