/
drep.go
38 lines (33 loc) · 871 Bytes
/
drep.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
package main
import (
"fmt"
"github.com/drep-project/drepcli/log"
"reflect"
"github.com/drep-project/drepcli/app"
rpcService "github.com/drep-project/drepcli/rpc/service"
accountService "github.com/drep-project/drepcli/accounts/service"
cliService "github.com/drep-project/drepcli/drepclient/service"
)
func main() {
drepApp := app.NewApp()
err := drepApp.AddServiceType(
reflect.TypeOf(log.LogService{}),
reflect.TypeOf(accountService.AccountService{}),
reflect.TypeOf(rpcService.RpcService{}),
reflect.TypeOf(cliService.CliService{}),
)
if err != nil {
fmt.Println(err)
return
}
drepApp.Name = "drep"
drepApp.Author = "Drep-Project"
drepApp.Email = ""
drepApp.Version = "0.1"
drepApp.HideVersion = true
drepApp.Copyright = "Copyright 2018 - now The drep Authors"
if err := drepApp.Run(); err != nil {
fmt.Println(err)
}
return
}