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

     1  // +build !plan9
     2  
     3  package bugapp
     4  
     5  import (
     6  	"os"
     7  )
     8  
     9  func getEditor() string {
    10  	editor := os.Getenv("EDITOR")
    11  
    12  	if editor != "" {
    13  		return editor
    14  	}
    15  	return "vim"
    16  
    17  }
    18