forked from mergestat/mergestat-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared.go
31 lines (26 loc) · 1021 Bytes
/
shared.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
//go:build shared
// +build shared
// This file provides a build target while building the dynamically loadable shared object library.
// It imports github.com/askgitdev/askgit/extensions which provides the actual extension implementation.
package main
import (
"os"
"github.com/askgitdev/askgit/extensions"
"github.com/askgitdev/askgit/extensions/options"
"github.com/askgitdev/askgit/pkg/locator"
"go.riyazali.net/sqlite"
)
func init() {
sqlite.Register(extensions.RegisterFn(
options.WithExtraFunctions(),
options.WithRepoLocator(locator.CachedLocator(locator.MultiLocator())),
options.WithGitHub(),
options.WithContextValue("githubToken", os.Getenv("GITHUB_TOKEN")),
options.WithContextValue("githubPerPage", os.Getenv("GITHUB_PER_PAGE")),
options.WithContextValue("githubRateLimit", os.Getenv("GITHUB_RATE_LIMIT")),
options.WithSourcegraph(),
options.WithContextValue("sourcegraphToken", os.Getenv("SOURCEGRAPH_TOKEN")),
options.WithNPM(),
))
}
func main() { /* noting here fellas */ }