printProfileLists renders the list-shaped attributes of the profile panel.
(profile memory.UserProfile)
| 797 | |
| 798 | // printProfileLists renders the list-shaped attributes of the profile panel. |
| 799 | func printProfileLists(profile memory.UserProfile) { |
| 800 | for _, f := range []struct { |
| 801 | key string |
| 802 | items []string |
| 803 | sep string |
| 804 | }{ |
| 805 | {"mem.cmd.profile.certifications", profile.Certifications, ", "}, |
| 806 | {"mem.cmd.profile.skills", profile.Skills, ", "}, |
| 807 | {"mem.cmd.profile.goals", profile.Goals, ", "}, |
| 808 | {"mem.cmd.profile.interests", profile.Interests, ", "}, |
| 809 | {"mem.cmd.profile.directives", profile.Directives, "; "}, |
| 810 | } { |
| 811 | if len(f.items) > 0 { |
| 812 | fmt.Printf(" %s %s\n", colorize(i18n.T(f.key), ColorYellow), strings.Join(f.items, f.sep)) |
| 813 | } |
| 814 | } |
| 815 | if len(profile.Environment) > 0 { |
| 816 | envEntries := make([]string, 0, len(profile.Environment)) |
| 817 | for _, k := range sortedStringKeys(profile.Environment) { |
| 818 | envEntries = append(envEntries, k+"="+profile.Environment[k]) |
| 819 | } |
| 820 | fmt.Printf(" %s %s\n", colorize(i18n.T("mem.cmd.profile.environment"), ColorYellow), strings.Join(envEntries, ", ")) |
| 821 | } |
| 822 | } |
| 823 | |
| 824 | // printProfileTimeline renders stances and the milestone timeline. |
| 825 | func printProfileTimeline(profile memory.UserProfile) { |
no test coverage detected