package main

import (
	"github.com/mislav/everyenv/cli"
	_ "github.com/mislav/everyenv/commands"
	"log"
	"os"
)

func main() {
	cmdName := os.Args[1]
	cmd := cli.Lookup(cmdName)

	if cmd != nil {
		cmd(os.Args[2:])
	} else {
		log.Fatalf("command not found: `%s`\n", cmdName)
	}
}

package main

import (
	"fmt"
	"github.com/mislav/everyenv/cli"
	_ "github.com/mislav/everyenv/commands"
	"os"
)

func main() {
	cmdName := os.Args[1]
	cmd := cli.Lookup(cmdName)

	if cmd != nil {
		cmd(os.Args[2:])
	} else {
		fmt.Printf("command not found: `%s`\n", cmdName)
		os.Exit(1)
	}
}

--- 
+++ 
@@ -1,9 +1,9 @@
 package main
 
 import (
-	"fmt"
 	"github.com/mislav/everyenv/cli"
 	_ "github.com/mislav/everyenv/commands"
+	"log"
 	"os"
 )
 
@@ -14,7 +14,6 @@
 	if cmd != nil {
 		cmd(os.Args[2:])
 	} else {
-		fmt.Printf("command not found: `%s`\n", cmdName)
-		os.Exit(1)
+		log.Fatalf("command not found: `%s`\n", cmdName)
 	}
 }
Use `log.Fatal()` instead of manual `os.Exit()`
