From cbaa89d5a4a021d0ad71e924ab184cd3b6533c77 Mon Sep 17 00:00:00 2001 From: "Nathan J. Mehl" Date: Thu, 21 Nov 2024 15:55:40 -0500 Subject: [PATCH] add docstring for printUsageAndExit --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index d6d355f..434c448 100644 --- a/main.go +++ b/main.go @@ -206,6 +206,8 @@ func printUsage() { flag.PrintDefaults() } +// printUsageAndExit prints usage and exits with status 0 +// if err is nil, otherwise it prints the error and exits with status 1 func printUsageAndExit(err error) { printUsage() if err != nil {