-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
66 lines (56 loc) · 1.56 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/author_name/project_name/configs"
"github.com/author_name/project_name/internal/tgbot"
"github.com/fatih/color"
)
func banner() string {
// https://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=%20project_name
return fmt.Sprintln(
color.YellowString("==================================================\n"),
color.HiBlueString(`
█████╗ ██████╗ ██████╗
██╔══██╗██╔══██╗██╔══██╗
███████║██████╔╝██████╔╝
██╔══██║██╔═══╝ ██╔═══╝
██║ ██║██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝ `+" By @author_name\n"),
color.BlueString("project_description\n"),
"Credits: https://github.com/author_name/project_name\n",
"Twitter: https://twitter.com/#\n",
color.YellowString("=================================================="),
)
}
type Arguments struct {
DelayOpt int
OutputOpt string
EnvOpt string
ProxyOpt string
ModeOpt string
}
var args Arguments
func init() {
args = Arguments{}
flag.Usage = func() {
h := []string{
banner(),
"Usage of: project_name <options> <args>",
"Options",
"Args",
}
_, _ = fmt.Fprintf(os.Stderr, strings.Join(h, "\n"))
}
flag.Parse()
}
func main() {
fmt.Println(banner())
configs.AppConfig.PrintInfo()
bot := tgbot.New()
// Notify service
//go bot.SubscribeNotification()
bot.RunBotController()
}