|
1
|
package main |
|
2
|
|
|
3
|
import ( |
|
4
|
"fmt" |
|
5
|
"os" |
|
6
|
"runtime/debug" |
|
7
|
|
|
8
|
"github.com/olexsmir/viye/internal/plumbing/config" |
|
9
|
"github.com/olexsmir/viye/internal/plumbing/curl" |
|
10
|
"github.com/olexsmir/viye/internal/plumbing/files" |
|
11
|
"github.com/olexsmir/viye/internal/plumbing/gobin" |
|
12
|
"github.com/olexsmir/viye/internal/plumbing/http" |
|
13
|
"github.com/olexsmir/viye/internal/plumbing/ip" |
|
14
|
"github.com/olexsmir/viye/internal/plumbing/json" |
|
15
|
"github.com/olexsmir/viye/internal/plumbing/makefile" |
|
16
|
"github.com/olexsmir/viye/internal/plumbing/neofetch" |
|
17
|
"github.com/olexsmir/viye/internal/plumbing/shell" |
|
18
|
"github.com/olexsmir/viye/internal/plumbing/tldr" |
|
19
|
"github.com/olexsmir/viye/internal/plumbing/url" |
|
20
|
"github.com/olexsmir/viye/internal/plumbing/weather" |
|
21
|
"github.com/olexsmir/viye/internal/viye" |
|
22
|
) |
|
23
|
|
|
24
|
func main() { |
|
25
|
debug.SetGCPercent(-1) |
|
26
|
|
|
27
|
v := viye.New() |
|
28
|
v.Register(&files.Tool{}) |
|
29
|
v.Register(&shell.Tool{}) |
|
30
|
v.Register(&http.Tool{}) |
|
31
|
v.Register(&url.Tool{}) |
|
32
|
v.Register(&ip.Tool{}) |
|
33
|
v.Register(&gobin.Tool{}) |
|
34
|
v.Register(&json.Tool{}) |
|
35
|
v.Register(&config.Tool{}) |
|
36
|
v.Register(&neofetch.Tool{}) |
|
37
|
v.Register(&makefile.Tool{}) |
|
38
|
v.Register(&curl.Tool{}) |
|
39
|
v.Register(&tldr.Tool{}) |
|
40
|
v.Register(&weather.Tool{}) |
|
41
|
|
|
42
|
if err := v.Run(os.Stdout, os.Args); err != nil { |
|
43
|
fmt.Fprintf(os.Stderr, "viye: %v\n", err) |
|
44
|
os.Exit(1) |
|
45
|
} |
|
46
|
} |