forked from reanahub/reana-client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
38 lines (31 loc) · 785 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
This file is part of REANA.
Copyright (C) 2022 CERN.
REANA is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
*/
/*
REANA client for interacting with REANA server.
Use --help for more information.
*/
package main
import (
"os"
"reanahub/reana-client-go/cmd"
"reanahub/reana-client-go/pkg/config"
"reanahub/reana-client-go/pkg/displayer"
"reanahub/reana-client-go/pkg/errorhandler"
log "github.com/sirupsen/logrus"
)
func main() {
rootCmd := cmd.NewRootCmd()
err := rootCmd.Execute()
if err != nil {
log.Debug(err)
err = errorhandler.HandleApiError(err)
if err != config.EmptyError {
displayer.DisplayMessage(err.Error(), displayer.Error, false, os.Stderr)
}
os.Exit(1)
}
}