-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
main.go
44 lines (37 loc) · 860 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
package main
import (
"io"
"log"
"os"
"github.com/yakuter/gossl/commands/help"
"github.com/yakuter/gossl/commands/info"
"github.com/yakuter/gossl/commands/key"
"github.com/yakuter/gossl/commands/req"
"github.com/yakuter/gossl/commands/ssh"
"github.com/yakuter/gossl/commands/ssh_copy"
"github.com/yakuter/gossl/commands/verify"
"github.com/urfave/cli/v2"
)
var Version = "v0.1.6"
func main() {
app := &cli.App{
Name: "GoSSL",
Usage: "Don't be afraid of SSL anymore",
Commands: Commands(os.Stdin),
Version: Version,
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}
func Commands(reader io.Reader) []*cli.Command {
return []*cli.Command{
help.Command(),
key.Command(),
req.Command(reader),
info.Command(),
verify.Command(),
ssh.Command(),
ssh_copy.Command(ssh_copy.StdinPasswordReader{}),
}
}