-
Notifications
You must be signed in to change notification settings - Fork 0
/
helpmenu.go
85 lines (81 loc) · 3.89 KB
/
helpmenu.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package main
import (
"fmt"
)
const (
InfoColor = "\033[1;34m%s\033[0m"
NoticeColor = "\033[1;36m%s\033[0m"
WarningColor = "\033[1;33m%s\033[0m"
ErrorColor = "\033[1;31m%s\033[0m"
DebugColor = "\033[0;36m%s\033[0m"
)
func helpHere(name string) {
fmt.Println()
fmt.Println("Version:", Release)
fmt.Println()
fmt.Printf(NoticeColor, "*** Display this help menu\n\r")
fmt.Println("Usage: \t", name, "--help")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens the Web UI with default Port: \"3333\" \n\r")
fmt.Println("Usage: \t", name, "--web")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens the Web UI with default Port: \"3333\" & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--web", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens the Web UI with alternative Port:\n\r")
fmt.Println("Usage: \t", name, "--web", "-port", "[port]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens the Web UI with alternative Port: & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--web", "-port", "[port]", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Starts SCMD without launching Web UI\n\r")
fmt.Println("Usage: \t", name, "--web", "-port", "[port]", "-service")
fmt.Println()
fmt.Printf(NoticeColor, "*** Starts SCMD without launching Web UI & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--web", "-port", "[port]", "-service", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens SSL Web UI with default Port: \"3333\" \n\r")
fmt.Println("Usage: \t", name, "--ssl", "[certificate.pem]", "[privkey.pem]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Starts SCMD without launching Web UI default Port: \"3333\" \n\r")
fmt.Println("Usage: \t", name, "--ssl", "-service", "[certificate.pem]", "[privkey.pem]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens SSL Web UI with default Port: \"3333\" & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--ssl", "[certificate.pem]", "[privkey.pem]", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens SSL web UI with alternative Port:\n\r")
fmt.Println("Usage: \t", name, "--ssl", "-port", "[port]", "[certificate.pem]", "[privkey.pem]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Opens SSL web UI with alternative Port: & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--ssl", "-port", "[port]", "[certificate.pem]", "[privkey.pem]", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Starts SCMD SSL without launching Web UI\n\r")
fmt.Println("Usage: \t", name, "--ssl", "-port", "[port]", "-service", "[certificate.pem]", "[privkey.pem]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Starts SCMD SSL without launching Web UI & \"DISABLE\" add commands\n\r")
fmt.Println("Usage: \t", name, "--ssl", "-port", "[port]", "-service", "[certificate.pem]", "[privkey.pem]", "-block")
fmt.Println()
fmt.Printf(NoticeColor, "*** Show local and available scmd version\n\r")
fmt.Println("Usage: \t", name, "--version")
fmt.Println()
fmt.Printf(NoticeColor, "*** Create a copy for the commands database and save it in Home folder\n\r")
fmt.Println("Usage: \t", name, "--copydb")
fmt.Println()
fmt.Printf(NoticeColor, "*** Download all available commands database from online (override locally saved commands)\n\r")
fmt.Println("Usage: \t", name, "--download")
fmt.Println()
fmt.Printf(NoticeColor, "*** Download and upgrade the latest version of the scmd application binary\n\r")
fmt.Println("Usage: \t", name, "--upgrade")
fmt.Println()
fmt.Printf(NoticeColor, "*** Search command based on comma separated pattern(s)\n\r")
fmt.Println("Usage: \t", name, "--search [pattern(s)]")
fmt.Println()
fmt.Printf(NoticeColor, "*** Save new command with description in the local database\n\r")
fmt.Println("Usage: \t", name, "--save [command] [description]")
fmt.Println()
}
func wrongSyntax() {
fmt.Println()
fmt.Println("Usage: \t", getName(), "--help")
fmt.Println()
}