// Links returns an array of every link found in the page.
485751
func (bow *Browser) Links() []*Link {
	links := make([]*Link, 0, InitialAssetsSliceSize)
	bow.Find("a").Each(func(_ int, s *goquery.Selection) {
		href, err := bow.attrToResolvedUrl("href", s)
		if err == nil {
			links = append(links, NewLinkAsset(
				href,
				bow.attrOrDefault("id", "", s),
				s.Text(),
			))
		}
	})

	return links
}
252975
func (rmr *RecordMatchRun) GetLinks() []Link {
	var links []Link
	for _, response := range rmr.Responses {
		for _, entry := range response.Message.Entry {
			if len(entry.Link) == 2 {
				source := entry.FullUrl
				var target string
				for _, l := range entry.Link {
					if l.Relation == "related" {
						target = l.Url
					}
				}
				var match string
				for _, e := range entry.Search.Extension {
					if e.Url == "http://hl7.org/fhir/StructureDefinition/patient-mpi-match" {
						match = e.ValueCode
					}
				}
				score := *entry.Search.Score
				links = append(links, Link{source, target, match, score})
			}
		}
	}
	sort.Sort(LinkSlice(links))
	return links
}
1327272
func (l Links) NextPage() (int, error) {
	if l.Next == "" {
		return 0, nil
	}
	return pageForURL(l.Next)
}
1342662
func (p Pages) ByLinkTitle() Pages {

	const key = "pageSort.ByLinkTitle"

	linkTitle := func(p1, p2 Page) bool {
		return p1.LinkTitle() < p2.LinkTitle()
	}

	pages, _ := spc.get(key, pageBy(linkTitle).Sort, p)

	return pages
}
458031
func (fs *FS) Readlink(link string) (target string, err error) {
	fs.log.CDebugf(fs.ctx, "Readlink %s", link)
	defer func() {
		fs.deferLog.CDebugf(fs.ctx, "Readlink done: %+v", err)
		err = translateErr(err)
	}()

	if err := fs.requireNonEmpty(); err != nil {
		return "", err
	}

	n, _, base, err := fs.lookupParent(link)
	if err != nil {
		return "", err
	}

	_, ei, err := fs.config.KBFSOps().Lookup(fs.ctx, n, base)
	if err != nil {
		return "", err
	}

	if ei.Type != data.Sym {
		return "", errors.Errorf("%s is not a symlink", link)
	}
	return ei.SymPath, nil
}
643953
func (c *ConstantStruct) Link(scope Scope, t TypeSpec) (ConstantValue, error) {
	s, ok := RootTypeSpec(t).(*StructSpec)
	if !ok {
		return nil, constantValueCastError{Value: c, Type: t}
	}

	for _, field := range s.Fields {
		f, ok := c.Fields[field.Name]
		if !ok {
			if field.Default == nil {
				if field.Required {
					return nil, constantValueCastError{
						Value:  c,
						Type:   t,
						Reason: fmt.Errorf("%q is a required field", field.Name),
					}
				}
				continue
			}
			f = field.Default
			c.Fields[field.Name] = f
		}

		f, err := f.Link(scope, field.Type)
		if err != nil {
			return nil, constantValueCastError{
				Value: c,
				Type:  t,
				Reason: constantStructFieldCastError{
					FieldName: field.Name,
					Reason:    err,
				},
			}
		}

		c.Fields[field.Name] = f
	}

	return c, nil
}
1210100
func (l *linkIndex) link(parent, child *container.Container, alias string) {
	l.mu.Lock()

	if l.idx[parent] == nil {
		l.idx[parent] = make(map[string]*container.Container)
	}
	l.idx[parent][alias] = child
	if l.childIdx[child] == nil {
		l.childIdx[child] = make(map[*container.Container]map[string]struct{})
	}
	if l.childIdx[child][parent] == nil {
		l.childIdx[child][parent] = make(map[string]struct{})
	}
	l.childIdx[child][parent][alias] = struct{}{}

	l.mu.Unlock()
}
939804
func (i *HTTPInstaller) link(from string) error {
	debug("symlinking %s to %s", from, i.Path())
	return os.Symlink(from, i.Path())
}
250589
func (this *MarkupConfluence) link(anchorName, linkText string) string {
	if linkText == "" {
		return fmt.Sprintf("[#%s]", anchorName)
	}
	return fmt.Sprintf("[%s|#%s]", linkText, anchorName)
}
386382
func (r Response) Links(req *http.Request, baseURL string) (ret jsonapi.Links) {
	ret = make(jsonapi.Links)

	if r.Pagination.Next != nil {
		ret["next"] = buildLink(baseURL, req, r.Pagination.Next)
	}
	if r.Pagination.Prev != nil {
		ret["prev"] = buildLink(baseURL, req, r.Pagination.Prev)
	}
	if r.Pagination.First != nil {
		ret["first"] = buildLink(baseURL, req, r.Pagination.First)
	}
	if r.Pagination.Last != nil {
		ret["last"] = buildLink(baseURL, req, r.Pagination.Last)
	}
	return
}
214492
func (i *LocalInstaller) link(from string) error {
	origin, err := filepath.Abs(from)
	if err != nil {
		return err
	}
	dest, err := filepath.Abs(i.Path())
	if err != nil {
		return err
	}
	return os.Symlink(origin, dest)
}
62229
func (a *Album) Link() *Link {
	sp_link := C.sp_link_create_from_album(a.sp_album)
	return newLink(a.session, sp_link, false)
}
1180614
func (self *Graph) Link(source, target uint32, weight float64) {
	if _, ok := self.nodes[source]; ok == false {
		self.nodes[source] = &node{
			weight:   0,
			outbound: 0,
		}
	}

	self.nodes[source].outbound += weight

	if _, ok := self.nodes[target]; ok == false {
		self.nodes[target] = &node{
			weight:   0,
			outbound: 0,
		}
	}

	if _, ok := self.edges[source]; ok == false {
		self.edges[source] = map[uint32]float64{}
	}

	self.edges[source][target] += weight
}
1067754
func (bs *blobStore) readlink(ctx context.Context, path string) (digest.Digest, error) {
	content, err := bs.driver.GetContent(ctx, path)
	if err != nil {
		return "", err
	}

	linked, err := digest.Parse(string(content))
	if err != nil {
		return "", err
	}

	return linked, nil
}
1050540
func ListLinks(c web.C, w http.ResponseWriter, r *http.Request) {
	account := r.Header.Get("X-Remote-User")
	for _, l := range links {
		if l.Owner == account {
			fmt.Fprintf(w, "%s\n", l.ShortLink)
		}
	}
}
850611
func (l *Link) HTML() template.HTML {
	if l == nil {
		return ""
	}
	buf := bytes.Buffer{}
	if err := linkifyTemplate.Execute(&buf, l); err != nil {
		panic(err)
	}
	return template.HTML(buf.Bytes())
}
1057563
func WithLinks(links ...string) func(*TestContainerConfig) {
	return func(c *TestContainerConfig) {
		c.HostConfig.Links = links
	}
}