Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func NoopYes() bool
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Fixture
- func (f Fixture) FilenameCC(revision int) string
- func (f Fixture) FilenamePR(revision int) string
- func (f Fixture) GetCommitRevision() *pb.CommitRevision
- func (f Fixture) GetCommitsComparison() (*github.CommitsComparison, error)
- func (f Fixture) GetPR() *github.PullRequest
- func (f Fixture) GetRevision(revision int) *Fixture
- func (f Fixture) GetRevisions() []*Fixture
- type Fixtures
- type PullRequestURL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func NoopYes ¶
func NoopYes() bool
NoopYes is a function that does absolutely nothing but returns true. I need to make this comment long enough so it would be catched by any linter that doesn't like long lines.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Fixture ¶
type Fixture struct { Name string URL PullRequestURL // There can be more than one revision of the fixture, but it should have // files for 0..CurrentRevision CurrentRevision int }
Fixture is struct for a test case
func (Fixture) FilenameCC ¶
func (Fixture) FilenamePR ¶
func (Fixture) GetCommitRevision ¶
func (f Fixture) GetCommitRevision() *pb.CommitRevision
GetCommitRevision builds a pb.CommitRevision from this fixture's GetPR()
func (Fixture) GetCommitsComparison ¶
func (f Fixture) GetCommitsComparison() (*github.CommitsComparison, error)
GetCommitsComparison returns the fixture saved from the github.Client.Repositories.CompareCommits output
func (Fixture) GetPR ¶
func (f Fixture) GetPR() *github.PullRequest
GetPR returns the fixture saved from the github.Client.PullRequests.Get output
func (Fixture) GetRevision ¶
GetRevision returns a copy of this Fixture at a different revision
func (Fixture) GetRevisions ¶
GetRevisions returns all this Fixture revisions, ordered from 0 to CurrentRevision
type Fixtures ¶
type Fixtures []*Fixture
Fixtures is a list of fixtures. If a fixture has more than one revision the most recent one is used
type PullRequestURL ¶
PullRequestURL is a struct with information about a pull request URL: github.com/<Owner>/<Repo>/pull/<Number>