Skip to content

Commit 22a28b3

Browse files
committed
fix: log error into stderr
1 parent 320a373 commit 22a28b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

converter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"fmt"
5+
"log"
56
"os"
67

78
"k8s.io/apimachinery/pkg/api/resource"
@@ -15,8 +16,7 @@ func main() {
1516
q, err := resource.ParseQuantity(os.Args[2])
1617

1718
if err != nil {
18-
fmt.Println(err.Error())
19-
os.Exit(1)
19+
log.Fatal(err)
2020
}
2121
fmt.Println(q.AsDec())
2222
}

0 commit comments

Comments
 (0)