From 289851b20f7d5dd95e105e1f61d2381d579a9e4e Mon Sep 17 00:00:00 2001 From: dtluna Date: Tue, 26 Mar 2019 12:39:35 +0300 Subject: [PATCH] Refactor usage() in dirname --- dirname/dirname.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dirname/dirname.go b/dirname/dirname.go index 7ea5e94..2b9fd6d 100644 --- a/dirname/dirname.go +++ b/dirname/dirname.go @@ -8,12 +8,12 @@ import ( func usage() { fmt.Printf("usage: %v path\n", os.Args[0]) + os.Exit(1) } func main() { if len(os.Args) != 2 { usage() - os.Exit(1) } fmt.Println(path.Dir(os.Args[1]))