-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcolibri.go
45 lines (37 loc) · 1.06 KB
/
colibri.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
package colibri
import (
"fmt"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/cloud"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/config"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/monitoring"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/observer"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/validator"
)
const banner = `
. _ _ _ _ _
{ \/'o;=== | (_) | (_)
.----'-/'-/ ___ ___ | |_| |__ _ __ _
'-..-| / / __ / _ \| | | '_ \| '__| |
/\/\ | (__| (_) | | | |_) | | | |
'--' \___ \___/|_|_|_.__/|_| |_|
project
`
func InitializeApp() {
if err := config.Load(); err != nil {
panic(fmt.Sprintf("Occurred a error on try load configs: %v", err))
}
printBanner()
printApplicationName()
validator.Initialize()
observer.Initialize()
monitoring.Initialize()
cloud.Initialize()
}
func printBanner() {
if config.IsDevelopmentEnvironment() {
fmt.Print(banner)
}
}
func printApplicationName() {
fmt.Printf("\n# %s #\n\n", config.APP_NAME)
}