MCPcopy
hub / github.com/cli/cli / CurrentLoginName

Function CurrentLoginName

api/queries_user.go:7–15  ·  view source on GitHub ↗
(client *Client, hostname string)

Source from the content-addressed store, hash-verified

5}
6
7func CurrentLoginName(client *Client, hostname string) (string, error) {
8 var query struct {
9 Viewer struct {
10 Login string
11 }
12 }
13 err := client.Query(hostname, "UserCurrent", &query, nil)
14 return query.Viewer.Login, err
15}
16
17func CurrentLoginNameAndOrgs(client *Client, hostname string) (string, []string, error) {
18 var query struct {

Callers 15

buildEntryFunction · 0.92
listOrgsFunction · 0.92
statusRunFunction · 0.92
renameRunFunction · 0.92
editRunFunction · 0.92
gardenRunFunction · 0.92
cloneRunFunction · 0.92
deleteRunFunction · 0.92
viewRunFunction · 0.92
createFromScratchFunction · 0.92
archiveRunFunction · 0.92
unarchiveRunFunction · 0.92

Calls 1

QueryMethod · 0.65

Tested by

no test coverage detected