-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
50 lines (40 loc) · 1.19 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
package main
import (
"fmt"
"github.com/joho/godotenv"
_ "github.com/suggestionsbot/lists/docs"
"log"
"os"
"time"
)
func init() {
if err := godotenv.Load(".env.local", ".env"); err != nil && !os.IsNotExist(err) {
log.Fatal("Error loading .env file")
}
loadDatabase()
loadConfig()
}
// @title Suggestions Lists
// @version 1.1
// @description This is the API documentation for the Lists API, responsible for intetracting with the various bot lists that Suggestions is listed on.
// @termsOfService https://suggestions.gg/terms
// @contact.name Suggestions
// @contact.url https://suggestions.bot/discord
// @contact.email hello@suggestions.gg
// @license.name AGPL-3.0
// @license.url https://github.com/suggestionsbot/lists/blob/main/LICENSE
// @tag.name General
// @tag.description All routes for the service.
// @securityDefinitions APIKeyHeader
// @in header
//
// @name Authorization
// @description The API key used to secure all API routes, preventing unauthorized access.
func main() {
version := getVersion()
date := time.Now()
year := date.Year()
message := fmt.Sprintf("Lists %s - Copyright (c) %d Anthony Collier", version, year)
fmt.Println(message)
handleServer()
}