MCPcopy Index your code
hub / github.com/cli/cli / currentLogin

Method currentLogin

pkg/cmd/pr/shared/params.go:298–308  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

296}
297
298func (r *MeReplacer) currentLogin() (string, error) {
299 if r.login != "" {
300 return r.login, nil
301 }
302 login, err := api.CurrentLoginName(r.apiClient, r.hostname)
303 if err != nil {
304 return "", fmt.Errorf("failed resolving `@me` to your user handle: %w", err)
305 }
306 r.login = login
307 return login, nil
308}
309
310func (r *MeReplacer) Replace(handle string) (string, error) {
311 if handle == "@me" {

Callers 1

ReplaceMethod · 0.95

Calls 2

CurrentLoginNameFunction · 0.92
ErrorfMethod · 0.65

Tested by

no test coverage detected