// CurrentUserName returns the name of a user as returned by CurrentUser()
510793
func (config *Config) CurrentUserName() (string, error) {
	user, err := config.CurrentUser()
	if err != nil {
		return "", err
	}
	return user.Name, nil
}
1053436
func (s *ImportSshPublicKeyOutput) SetUserName(v string) *ImportSshPublicKeyOutput {
	s.UserName = &v
	return s
}
523949
func (s *ListMFADevicesInput) SetUserName(v string) *ListMFADevicesInput {
	s.UserName = &v
	return s
}
1212595
func (s *PutUserPermissionsBoundaryInput) SetUserName(v string) *PutUserPermissionsBoundaryInput {
	s.UserName = &v
	return s
}
276540
func GetUserName(w http.ResponseWriter) (string, bool) {
	usr, ok := GetResponseWriter(w, func(tst http.ResponseWriter) bool {
		_, ok := tst.(*userResponseWriter)
		return ok
	})
	if ok {
		return usr.(*userResponseWriter).userName, true
	}
	return "", false
}
84158
func (s *ListAccessKeysInput) SetUserName(v string) *ListAccessKeysInput {
	s.UserName = &v
	return s
}
357552
func (s *AdminUpdateUserAttributesInput) SetUsername(v string) *AdminUpdateUserAttributesInput {
	s.Username = &v
	return s
}
1274029
func (s *AdminAddUserToGroupInput) SetUsername(v string) *AdminAddUserToGroupInput {
	s.Username = &v
	return s
}
363152
func (s *userService) UpdateUsername(id int64, newUsername string) (datamodels.User, error) {
	return s.Update(id, datamodels.User{
		Username: newUsername,
	})
}
896457
func (s *ListAttachedUserPoliciesInput) SetUserName(v string) *ListAttachedUserPoliciesInput {
	s.UserName = &v
	return s
}
42239
func (w *CurrentWeatherData) CurrentByName(location string) error {
	response, err := w.client.Get(fmt.Sprintf(fmt.Sprintf(baseURL, "appid=%s&q=%s&units=%s&lang=%s"), w.Key, url.QueryEscape(location), w.Unit, w.Lang))
	if err != nil {
		return err
	}
	defer response.Body.Close()

	if err := json.NewDecoder(response.Body).Decode(&w); err != nil {
		return err
	}

	return nil
}
853325
func (a *Config) GetUserName(c echo.Context) string {
	username, _, _ := c.Request().BasicAuth()
	return username
}
817920
func (tracker *issueTracker) CurrentUser() (common.User, error) {
	task := "Get the GitHub user record for the authenticated user"
	client := tracker.newClient()

	var (
		me  *github.User
		err error
	)
	withRequestAllocated(func() {
		me, _, err = client.Users.Get("")
	})
	if err != nil {
		return nil, errs.NewError(task, err)
	}

	return &user{me}, nil
}
700970
func (s *AdminSetUserMFAPreferenceInput) SetUsername(v string) *AdminSetUserMFAPreferenceInput {
	s.Username = &v
	return s
}
547135
func (s *GetSSHPublicKeyInput) SetUserName(v string) *GetSSHPublicKeyInput {
	s.UserName = &v
	return s
}
227280
func (s *AdminListDevicesInput) SetUsername(v string) *AdminListDevicesInput {
	s.Username = &v
	return s
}
105629
func (s *CreateAccessKeyInput) SetUserName(v string) *CreateAccessKeyInput {
	s.UserName = &v
	return s
}