-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
30 lines (26 loc) · 797 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
package githosts
import (
"log"
"os"
"time"
)
const (
workingDIRName = ".working"
maxIdleConns = 10
idleConnTimeout = 30 * time.Second
defaultHttpRequestTimeout = 30 * time.Second
defaultHttpClientTimeout = 10 * time.Second
timeStampFormat = "20060102150405"
bitbucketAPIURL = "https://api.bitbucket.org/2.0"
githubAPIURL = "https://api.github.com/graphql"
gitlabAPIURL = "https://gitlab.com/api/v4"
gitlabProjectsPerPageDefault = 20
contentTypeApplicationJSON = "application/json; charset=utf-8"
)
var logger *log.Logger
func init() {
// allow for tests to override
if logger == nil {
logger = log.New(os.Stdout, logEntryPrefix, log.Lshortfile|log.LstdFlags)
}
}