clean up pointerisms, fix building real client
google github library returns *Foo in singular case and []Foo if there are many results. seems like the best approach is to pass them around by-value, since *Foo seems to only be so that they can return 'nil' instead of a zero-value.
This commit is contained in:
@@ -38,8 +38,8 @@ var _ = Describe("Out Command", func() {
|
||||
sourcesDir, err = ioutil.TempDir("", "github-release")
|
||||
Ω(err).ShouldNot(HaveOccurred())
|
||||
|
||||
githubClient.CreateReleaseStub = func(gh *github.RepositoryRelease) (*github.RepositoryRelease, error) {
|
||||
createdRel := *gh
|
||||
githubClient.CreateReleaseStub = func(gh github.RepositoryRelease) (*github.RepositoryRelease, error) {
|
||||
createdRel := gh
|
||||
createdRel.ID = github.Int(112)
|
||||
createdRel.HTMLURL = github.String("http://google.com")
|
||||
createdRel.Name = github.String("release-name")
|
||||
@@ -47,8 +47,8 @@ var _ = Describe("Out Command", func() {
|
||||
return &createdRel, nil
|
||||
}
|
||||
|
||||
githubClient.UpdateReleaseStub = func(gh *github.RepositoryRelease) (*github.RepositoryRelease, error) {
|
||||
return gh, nil
|
||||
githubClient.UpdateReleaseStub = func(gh github.RepositoryRelease) (*github.RepositoryRelease, error) {
|
||||
return &gh, nil
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user