mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
refactor: write errors into stderr and add exit code
Instead of writing errors into stdout and alway returning exit code 0, we now write into stderr and return exit code 1 in case that an error occured.
This commit is contained in:
parent
3ccd4d07e9
commit
0b60fef246
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -5,7 +5,7 @@ package main
|
|||
//go:generate git tag -af v$VERSION -m "v$VERSION"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/schollz/croc/v8/src/cli"
|
||||
)
|
||||
|
@ -28,6 +28,6 @@ func main() {
|
|||
// }
|
||||
// }()
|
||||
if err := cli.Run(); err != nil {
|
||||
fmt.Println(err)
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue