Version: v0.0.0-...-f8bba77 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type FileGetter

type FileGetter func(path string) ([]byte, error)

FileGetter is a function that downloads the file from the provided path via to avoid getting rate limited. It returns a nil error on 404. TODO: Rethink the 404 behavior?

func FileGetterFactory

func FileGetterFactory(org, repo, branch string, opts ...Opt) FileGetter

FileGetterFactory returns a GithubFileGetter that downloads files from for the provided org/repo/branch It avoids getting ratelimited by using Because it is using a plain http client it can be heavily paralellized without killing the machine. It supports private repositories when configured WithAuthentication.

type Opt

type Opt func(*Opts)

func WithAuthentication

func WithAuthentication(username, token string) Opt

type Opts

type Opts struct {
	// The username to use for basic auth
	BasicAuthUser string
	// The token to use for basic auth
	BasicAuthPassword string

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL