mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
Refactor main() a bit
This commit is contained in:
parent
c1ace4c9d9
commit
20f167f7b4
1 changed files with 2 additions and 4 deletions
6
main.go
6
main.go
|
@ -127,9 +127,7 @@ func runRoot(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
|
||||
func main() {
|
||||
err := cmdRoot.Execute()
|
||||
if err != nil {
|
||||
log.Printf("error: %v", err)
|
||||
os.Exit(1)
|
||||
if err := cmdRoot.Execute(); err != nil {
|
||||
log.Fatalf("error: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue