INNER CODE UNIT · Go

init

mergestat/mergestat-lite · shared.go:18

func init() {
	multiLocOpt := &locator.MultiLocatorOptions{
		InsecureSkipTLS: os.Getenv("GIT_SSL_NO_VERIFY") != "",
	}

	githubToken := os.Getenv("GITHUB_TOKEN")
	if githubToken != "" {
		multiLocOpt.HTTPAuth = &http.BasicAuth{Username: githubToken}
	}

	sqlite.Register(extensions.RegisterFn(
		options.WithExtraFunctions(),
		options.WithRepoLocator(locator.CachedLocator(locator.MultiLocator(multiLocOpt))),
		options.WithGitHub(),
		options.WithContextValue("githubToken", githubToken),
		options.WithContextValue("githubPerPage", os.Getenv("GITHUB_PER_PAGE")),
		options.WithContextValue("githubRateLimit", os.Getenv("GITHUB_RATE_LIMIT")),
		options.WithSourcegraph(),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…