// getLink is a wrapper that fetches the netlink corresponding to the ifname
515713
func getLink(ifname string) (netlink.Link, error) {
	// find the link
	link, err := netlink.LinkByName(ifname)
	if err != nil {
		if !strings.Contains(err.Error(), "Link not found") {
			log.Errorf("unable to find link %q. Error: %q", ifname, err)
			return link, err
		}
		// try once more as sometimes (somehow) link creation is taking
		// sometime, causing link not found error
		time.Sleep(1 * time.Second)
		link, err = netlink.LinkByName(ifname)
		if err != nil {
			log.Errorf("unable to find link %q. Error %q", ifname, err)
		}
		return link, err
	}
	return link, err
}
599824
func (l *Label) GetURL() string {
	if l == nil || l.URL == nil {
		return ""
	}
	return *l.URL
}
351695
func (g *GistFork) GetURL() string {
	if g == nil || g.URL == nil {
		return ""
	}
	return *g.URL
}
126732
func (n *Network) GetName() (string, error) {
	var err C.virError
	name := C.virNetworkGetNameWrapper(n.ptr, &err)
	if name == nil {
		return "", makeError(&err)
	}
	return C.GoString(name), nil
}
622635
func (c *Commit) GetURL() string {
	if c == nil || c.URL == nil {
		return ""
	}
	return *c.URL
}
37403
func (g *CoordinatorLinkGenerator) GetLink(names ...types.StreamName) string {
	paths := make([]types.StreamPath, len(names))
	for i, name := range names {
		paths[i] = g.Prefix.AsPathPrefix(name)
	}
	return viewer.GetURL(g.Host, g.Project, paths...)
}
711354
func (r *RepositoryInvitation) GetURL() string {
	if r == nil || r.URL == nil {
		return ""
	}
	return *r.URL
}
1307917
func (p *Project) GetURL() string {
	if p == nil || p.URL == nil {
		return ""
	}
	return *p.URL
}
1196348
func (m *Metric) GetURL() string {
	if m == nil || m.URL == nil {
		return ""
	}
	return *m.URL
}
267055
func (c Context) AddLink(link string) string {
	if c.responseHeader == nil {
		return ""
	}
	c.responseHeader.Add("Link", link)
	return ""
}
1182896
func (g *HttpGetter) Get(href string) (*bytes.Buffer, error) {
	return g.get(href)
}
886387
func (d *Deployment) GetURL() string {
	if d == nil || d.URL == nil {
		return ""
	}
	return *d.URL
}
671767
func (t *Tag) GetURL() string {
	if t == nil || t.URL == nil {
		return ""
	}
	return *t.URL
}
158094
func (g *Grant) GetURL() string {
	if g == nil || g.URL == nil {
		return ""
	}
	return *g.URL
}
320739
func (n navigator) getLinks(uri string) (Links, error) {
	req, err := newHalRequest("GET", uri, nil)
	if err != nil {
		return Links{}, err
	}

	res, err := n.HttpClient.Do(req)
	if err != nil {
		return Links{}, err
	}
	defer res.Body.Close()

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return Links{}, err
	}

	var m Links

	if err := json.Unmarshal(body, &m); err != nil {
		return Links{}, fmt.Errorf("Unable to unmarshal '%s': %v", string(body), err)
	}

	return m, nil
}
1210581
func (i *Import) GetURL() string {
	if i == nil || i.URL == nil {
		return ""
	}
	return *i.URL
}
22269
func (c Client) getURL(path string) string {
	return fmt.Sprintf("%s://%s:%d/%s/%s", c.schema, c.host, c.port, c.version, path)
}