Registry /
testing / migueleliasweb-go-github-mock
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
mock
✓ github.com/migueleliasweb/go-github-mock
Create a mocked GitHub client and simulate a user fetch.
package main
import (
"github.com/google/go-github/v45/github"
"github.com/migueleliasweb/go-github-mock"
)
func main() {
mockedHTTPClient := mock.NewMockedHTTPClient(
mock.WithRequestMatch(
mock.GetUsers,
[]*github.User{{Login: github.String("octocat")}},
),
)
client := github.NewClient(mockedHTTPClient)
user, _, _ := client.Users.Get(ctx, "octocat")
fmt.Println(user.GetLogin())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.5.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.