-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
35 lines (29 loc) · 709 Bytes
/
main.go
File metadata and controls
35 lines (29 loc) · 709 Bytes
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
package main
import (
"log"
"net/http"
"os"
"github.com/urfave/cli/v2"
"github.com/ppapapetrou76/go-data-gov-gr-sdk/api"
"github.com/ppapapetrou76/go-data-gov-gr-sdk/internal"
"github.com/ppapapetrou76/go-data-gov-gr-sdk/internal/cmd"
)
func main() {
app := cliApp()
internal.Instance(&http.Client{
Timeout: api.DefaultTimeout,
})
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}
func cliApp() *cli.App {
return &cli.App{
Name: "ggd-cli",
Usage: "The opensource CLI of open data available in data.gov.gr by the Greek Government",
Authors: []*cli.Author{
{Name: "Patroklos Papapetrou", Email: "ppapapetrou76 at gmail dot com"},
},
Commands: cmd.Commands(),
}
}