Documentation
¶
Index ¶
Examples ¶
Constants ¶
View Source
const (
USER_REPOS = "https://api.github.com/users/DnFreddie/repos"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type RepoExistErr ¶
type RepoExistErr struct {
// contains filtered or unexported fields
}
func (RepoExistErr) Error ¶
func (e RepoExistErr) Error() string
func (RepoExistErr) Is ¶
func (e RepoExistErr) Is(target error) bool
type RepoManager ¶
type RepoManager struct {
Repos []Repo
}
func NewRepoManager ¶
func NewRepoManager(url string, client *http.Client) (*RepoManager, error)
func (*RepoManager) FilterByOwner ¶
func (rm *RepoManager) FilterByOwner(owner string) *RepoManager
Example ¶
rm := &RepoManager{ Repos: []Repo{ {Name: "repo1", Owner: "owner1"}, {Name: "repo2", Owner: "owner2"}, {Name: "repo3", Owner: "owner1"}, }, } filtered := rm.FilterByOwner("owner1") for _, repo := range filtered.Repos { fmt.Println(repo.Name) }
Output: repo1 repo3
func (*RepoManager) PrintNames ¶
func (rm *RepoManager) PrintNames()
Click to show internal directories.
Click to hide internal directories.