()
| 14 | ) |
| 15 | |
| 16 | func 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 | } |
nothing calls this directly
no test coverage detected