func()

in app.go [279:299]


func (app *App) profileName(userRole string) (string, error) {
	var profileNamePrefix string

	roleARN, err := app.roleARN(userRole)
	if err != nil {
		return "", err
	}

	parsedARN, err := arn.Parse(roleARN)
	if err != nil {
		return "", err
	}

	if app.config.ProfileNamePrefix != "" {
		profileNamePrefix = app.config.ProfileNamePrefix
	} else {
		profileNamePrefix = parsedARN.AccountID
	}

	return fmt.Sprintf("%s-%s", profileNamePrefix, filepath.Base(parsedARN.Resource)), nil
}