-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
45 lines (38 loc) · 863 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
39
40
41
42
43
44
45
package main
import (
"context"
"fmt"
"os"
"github.com/cortze/ipfs-cid-hoarder/cmd"
"github.com/sirupsen/logrus"
cli "github.com/urfave/cli/v2"
)
var (
CliName = "ipfs-cid-hoarder"
CliVersion = "v0.1.0"
log = logrus.WithField(
"App", CliName,
)
)
func main() {
fmt.Println(CliName, CliVersion)
cidHoarder := cli.App{
Name: CliName,
Usage: "Tiny cli to request CIDs in the IPFS network with the double task of analyze their metadata and availability",
UsageText: "cid-hoarder [subcommands] [arguments]",
Authors: []*cli.Author{
{
Name: "Mikel Cortes (@cortze)",
Email: "[email protected]",
},
},
Commands: []*cli.Command{
cmd.RunCmd,
cmd.CrawlerCmd,
},
}
if err := cidHoarder.RunContext(context.Background(), os.Args); err != nil {
log.Errorf("error: %v\n", err)
os.Exit(1)
}
}