use PrintErrln instead of log
This commit is contained in:
@@ -18,7 +18,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math/big"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
@@ -32,7 +31,7 @@ func isprime(cmd *cobra.Command, args []string) {
|
||||
for _, s := range args {
|
||||
_, ok := x.SetString(s, 10)
|
||||
if !ok {
|
||||
log.Print("invalid input " + s)
|
||||
cmd.PrintErrln("invalid input " + s)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user