MCPcopy Create free account
hub / github.com/Preloading/TwitterAPIBridge / main

Function main

main.go:16–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func main() {
17 // Enable pprof for debugging purposes
18 // go func() {
19 // log.Println(http.ListenAndServe("localhost:6060", nil))
20 // }()
21
22 var err error
23 configData, err = config.LoadConfig()
24 if err != nil {
25 fmt.Printf("Error loading config: %v\n", err)
26 return
27 }
28
29 if configData.SecretKey == "" {
30 fmt.Println("The JWT Secret key must be set in config.yaml.")
31 return
32 } else if len(configData.SecretKey) < 32 {
33 fmt.Println("The JWT Secret key must be 32 bytes long")
34 return
35 }
36
37 db_controller.InitDB(*configData)
38 twitterv1.InitServer(configData)
39}

Callers

nothing calls this directly

Calls 3

LoadConfigFunction · 0.92
InitDBFunction · 0.92
InitServerFunction · 0.92

Tested by

no test coverage detected