From 017494938f061fd1276f2a54b1df0e7002655e9f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 10 Apr 2025 21:28:45 +0300 Subject: can serialize and deserialize to/from gob --- cmd/ior/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/ior/main.go b/cmd/ior/main.go index 5e82283..0f3b38e 100644 --- a/cmd/ior/main.go +++ b/cmd/ior/main.go @@ -1,9 +1,10 @@ package main import ( + "fmt" "ior/internal" "ior/internal/flags" - "log" + "os" "runtime" ) @@ -11,7 +12,8 @@ import ( // parses command-line flags, and runs the internal logic of the application. func main() { if runtime.GOOS != "linux" { - log.Fatal("Unsupported OS") + fmt.Println("Unsupported OS") + os.Exit(2) } // Parse command-line flags @@ -19,6 +21,7 @@ func main() { // Run the internal logic of the application if err := internal.Run(); err != nil { - log.Fatalf("Failed to run: %v", err) + fmt.Printf("Failed to run: %v\n", err) + os.Exit(2) } } -- cgit v1.2.3