diff options
| author | Paul Buetow <paul@buetow.org> | 2025-04-10 21:28:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-04-10 21:28:45 +0300 |
| commit | 017494938f061fd1276f2a54b1df0e7002655e9f (patch) | |
| tree | 9c98fbf31b524233b637079a0482b4255eb6e388 /cmd | |
| parent | 9572fa5d087731f68d55517847833f6203b9a70d (diff) | |
can serialize and deserialize to/from gob
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/ior/main.go | 9 |
1 files changed, 6 insertions, 3 deletions
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) } } |
