-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
73 lines (56 loc) · 1.46 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
67
68
69
70
71
72
73
package main
import (
"log"
"os"
"bookable24.de/main/handlejson"
"bookable24.de/main/helpers"
"github.com/joho/godotenv"
)
// "fmt"
// "log"
// "bookable24.de/main/greetings"
// "bookable24.de/main/overviewgo"
const numPool = 500
func CaculateValue(intChan chan int) {
randomNumber := helpers.RandomNumber(numPool)
intChan <- randomNumber
}
func main() {
// Set properties of the predefined Logger, including
// the log entry prefix and a flag to disable printing
// the time, source file, and line number.
// log.SetPrefix("Show: ")
log.SetFlags(0)
// A slice of names.
// names := []string{"Teddy", "Luna", "Lily"}
// Request greeting messages for the names slice
// messages, err := greetings.Hellos(names)
// Request a greeting message.
// message, err := greetings.Hello("Luna")
// If an error was returned, print it to the console and
// exit the program.
// if err != nil {
// log.Fatal(err)
// }
// If no error was returned, print the returned
// message | messages to the console.
// fmt.Println(message)
// fmt.Println(messages)
// call overviewgo module
// overviewgo.ShowMyMap()
// overviewgo.ShowMySlice()
// overviewgo.ShowInfo()
// intChan := make(chan int)
// defer close(intChan)
// go CaculateValue(intChan)
// log.Println(<-intChan)
handlejson.ParseJson()
// Loading env
err := godotenv.Load()
if err != nil {
log.Fatal("Error, loading env fail")
}
// Get Key
key := os.Getenv("SUPER_KEY")
log.Println("KEY", key)
}