code: func getTypesOfLinks(ctx context.Context, appl application.Application, req *http.Request, linksDataArr []*app.WorkItemLinkData) ([]*app.WorkItemLinkTypeData, error) {
  	// Build our "set" of distinct type IDs
  	idMap := map[uuid.UUID]struct{}{}
  	idArr := []uuid.UUID{}
  	for _, linkData := range linksDataArr {
  		id := linkData.Relationships.LinkType.Data.ID
  		if _, ok := idMap[id]; !ok {
  			idMap[id] = struct{}{}
  			idArr = append(idArr, id)
  		}
  	}
  
  	// Now include the optional link type data in the work item link "included" array
  	linkTypeModels := []link.WorkItemLinkType{}
  	for _, typeID := range idArr {
  		linkTypeModel, err := appl.WorkItemLinkTypes().Load(ctx, typeID)
  		if err != nil {
  			return nil, errs.WithStack(err)
  		}
  		linkTypeModels = append(linkTypeModels, *linkTypeModel)
  	}
  	appLinkTypes, err := ConvertLinkTypesFromModels(req, linkTypeModels)
  	if err != nil {
  		return nil, errs.WithStack(err)
  	}
  	return appLinkTypes.Data, nil
  }
docs: // getTypesOfLinks returns an array of distinct work item link types for the
  // given work item links