replace log.Fatal with cobra.CheckErr

This commit is contained in:
filifa
2025-08-27 21:33:44 -04:00
parent 51e1a97c43
commit 65c8ab4057
5 changed files with 14 additions and 18 deletions

View File

@@ -18,7 +18,6 @@ package cmd
import (
"fmt"
"log"
"math/big"
"github.com/spf13/cobra"
@@ -47,7 +46,7 @@ func gcd(cmd *cobra.Command, args []string) {
for i, s := range args {
_, ok := w.SetString(s, 10)
if !ok {
log.Fatal("invalid input " + s)
cobra.CheckErr("invalid input " + s)
}
z.GCD(x, y, z, w)