code: func getWorkItemsOfLinks(ctx context.Context, appl application.Application, req *http.Request, linksDataArr []*app.WorkItemLinkData) ([]*app.WorkItem, error) {
  	// Build our "set" of distinct work item IDs
  	idMap := map[uuid.UUID]struct{}{}
  	idArr := []uuid.UUID{}
  	for _, linkData := range linksDataArr {
  		src := linkData.Relationships.Source.Data.ID
  		tgt := linkData.Relationships.Target.Data.ID
  		if _, ok := idMap[src]; !ok {
  			idMap[src] = struct{}{}
  			idArr = append(idArr, src)
  		}
  		if _, ok := idMap[tgt]; !ok {
  			idMap[tgt] = struct{}{}
  			idArr = append(idArr, tgt)
  		}
  	}
  
  	// Fetch all work items specified in the array
  	res := []*app.WorkItem{}
  	for _, id := range idArr {
  		wi, err := appl.WorkItems().LoadByID(ctx, id)
  		if err != nil {
  			return nil, errs.WithStack(err)
  		}
  		wit, err := appl.WorkItemTypes().Load(ctx, wi.Type)
  		if err != nil {
  			return nil, errs.Wrapf(err, "failed to load work item type: %s", wi.Type)
  		}
  		converted, err := ConvertWorkItem(req, *wit, *wi)
  		if err != nil {
  			return nil, errs.WithStack(err)
  		}
  		res = append(res, converted)
  	}
  	return res, nil
  }
docs: // getWorkItemsOfLinks returns an array of distinct work items as they appear as
  // source or target in the given work item links.