listRef resolves a canonical list-field name to its slice.
(field string)
| 251 | |
| 252 | // listRef resolves a canonical list-field name to its slice. |
| 253 | func (ps *UserProfileStore) listRef(field string) *[]string { |
| 254 | switch field { |
| 255 | case "certifications": |
| 256 | return &ps.profile.Certifications |
| 257 | case "skills": |
| 258 | return &ps.profile.Skills |
| 259 | case "goals": |
| 260 | return &ps.profile.Goals |
| 261 | case "interests": |
| 262 | return &ps.profile.Interests |
| 263 | case "directives": |
| 264 | return &ps.profile.Directives |
| 265 | } |
| 266 | return nil |
| 267 | } |
| 268 | |
| 269 | // applyListOp executes one list operation; callers must hold the write lock. |
| 270 | func (ps *UserProfileStore) applyListOp(field string, op listOp, value string) bool { |