-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
42 lines (31 loc) · 865 Bytes
/
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
package main
import (
"context"
"log"
"go-poem-project/internal/animation"
"go-poem-project/internal/instrumentation"
"go-poem-project/internal/poem"
)
func main() {
ctx := context.Background()
instOptions := []instrumentation.Option{}
inst, err := instrumentation.NewInstrumentation(ctx, instOptions...)
if err != nil {
log.Fatalf("failed to create instrumentation: %v", err)
}
err = inst.Load(ctx)
if err != nil {
log.Fatalf("failed to load instrumentation: %v", err)
}
log.Println("instrumentation loaded successfully, starting...")
if err = inst.Run(ctx); err != nil {
log.Fatalf("instrumentation crashed: %v", err)
}
defer inst.Shutdown(ctx)
// Gerar e imprimir um poema
poemText := poem.ForHer()
log.Println("Generated poem:")
log.Println(poemText)
// Imprimir animação de céu estrelado
animation.PrintStarrySky()
}