Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ListRepositoriesCommand = &cli.Command{ Name: "list-repositories", Aliases: []string{"lr"}, Usage: "List all repositories for a user", Action: func(c *cli.Context) error { client := util.GetGitHubClient() user, _, err := client.Users.Get(c.Context, "") if err != nil { return err } repos, _, err := client.Repositories.List(c.Context, *user.Login, nil) if err != nil { return err } fmt.Println("Repositories for", *user.Login) for _, repo := range repos { fmt.Println(*repo.Name) } return nil }, }
ListRepositoriesCommand represents the "list-repositories" command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.