-
Notifications
You must be signed in to change notification settings - Fork 0
/
test
41 lines (37 loc) · 915 Bytes
/
test
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
// successChan := make(chan bool)
// go utils.SendMail(
// successChan,
// "[email protected]",
// "test project",
// "test site",
// "https://www.site.com",
// "501",
// )
// for {
// fmt.Println("Hello")
// time.Sleep(time.Second*5)
// }
// success:=<-successChan
// if success==true {
// fmt.Println("sent successfully")
// } else {
// fmt.Println("not sent")
// }
projects, err := database.GetProjects()
if err!=nil {
log.Fatal(err)
}
for _, project := range projects {
fmt.Println(project.UserName)
fmt.Println(project.ProjectName)
for _, alert := range project.AlertTriggers {
fmt.Println("------------------------------")
fmt.Println(alert.SiteName)
fmt.Println(alert.SiteUrl)
fmt.Println(alert.AlertType)
// for _, type := range alert.AlertType {
// fmt.Println(type)
// }
}
fmt.Println("------------------------------")
}