"opening and editing"

This commit is contained in:
Jesse Duffield 2018-08-08 19:46:21 +10:00
parent 3839719154
commit c965333756
3 changed files with 29 additions and 24 deletions

10
main.go
View file

@ -19,7 +19,6 @@ var (
ErrSubprocess = errors.New("running subprocess")
subprocess *exec.Cmd
startTime time.Time
debugging bool
// Rev - Git Revision
Rev string
@ -27,9 +26,9 @@ var (
// Version - Version number
Version = "unversioned"
builddate string
debuggingPointer = flag.Bool("debug", false, "a boolean")
versionFlag = flag.Bool("v", false, "Print the current version")
builddate string
debuggingFlag = flag.Bool("debug", false, "a boolean")
versionFlag = flag.Bool("v", false, "Print the current version")
)
func homeDirectory() string {
@ -53,7 +52,7 @@ func commandLog(objects ...interface{}) {
}
func localLog(colour color.Attribute, path string, objects ...interface{}) {
if !debugging {
if !*debuggingFlag {
return
}
f, _ := os.OpenFile(path, os.O_APPEND|os.O_WRONLY, 0644)
@ -75,7 +74,6 @@ func navigateToRepoRootDirectory() {
func main() {
startTime = time.Now()
debugging = *debuggingPointer
devLog("\n\n\n\n\n\n\n\n\n\n")
flag.Parse()
if *versionFlag {