// AddURLLink adds a URL link to this Step's links list.
494856
func (as *Step) AddURLLink(label, alias, url string) {
	link := as.getOrCreateLinkForLabel(label)
	link.AliasLabel = alias
	link.Value = &milo.Link_Url{url}
}
422080
func (b *URLBackoff) baseUrlKey(rawurl *url.URL) string {
	// Simple implementation for now, just the host.
	// We may backoff specific paths (i.e. "pods") differentially
	// in the future.
	host, err := url.Parse(rawurl.String())
	if err != nil {
		klog.V(4).Infof("Error extracting url: %v", rawurl)
		panic("bad url!")
	}
	return host.Host
}
546411
func (enc *Encoder) AddSliceStringKey(k string, s []string) {
	enc.SliceStringKey(k, s)
}
30848
func (c *TokenController) LinkCallback(ctx *app.LinkCallbackTokenContext) error {
	redirectLocation, err := c.app.LinkService().Callback(ctx, ctx.RequestData, ctx.State, ctx.Code)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	ctx.ResponseData.Header().Set("Location", redirectLocation)
	return ctx.TemporaryRedirect()
}
452537
func (p *ChannelPackager) AckAddHtlcs(tx *bbolt.Tx, addRefs ...AddRef) error {
	if len(addRefs) == 0 {
		return nil
	}

	fwdPkgBkt := tx.Bucket(fwdPackagesKey)
	if fwdPkgBkt == nil {
		return ErrCorruptedFwdPkg
	}

	sourceKey := makeLogKey(p.source.ToUint64())
	sourceBkt := fwdPkgBkt.Bucket(sourceKey[:])
	if sourceBkt == nil {
		return ErrCorruptedFwdPkg
	}

	// Organize the forward references such that we just get a single slice
	// of indexes for each unique height.
	heightDiffs := make(map[uint64][]uint16)
	for _, addRef := range addRefs {
		heightDiffs[addRef.Height] = append(
			heightDiffs[addRef.Height],
			addRef.Index,
		)
	}

	// Load each height bucket once and remove all acked htlcs at that
	// height.
	for height, indexes := range heightDiffs {
		err := ackAddHtlcsAtHeight(sourceBkt, height, indexes)
		if err != nil {
			return err
		}
	}

	return nil
}
389024
func unmarshalLink(raw json.RawMessage) (*Link, error) {
	link := &Link{}
	if err := json.Unmarshal(raw, link); err != nil {
		return nil, err
	}

	return link, nil
}
267055
func (c Context) AddLink(link string) string {
	if c.responseHeader == nil {
		return ""
	}
	c.responseHeader.Add("Link", link)
	return ""
}
580670
func (gp *GoPdf) AddExternalLink(url string, x, y, w, h float64) {
	gp.UnitsToPointsVar(&x, &y, &w, &h)
	page := gp.pdfObjs[gp.curr.IndexOfPageObj].(*PageObj)
	page.Links = append(page.Links, linkOption{x, gp.config.PageSize.H - y, w, h, url, ""})
}
946160
func (client *Client) AddLIFF(view View) *AddLIFFCall {
	return &AddLIFFCall{
		c:    client,
		view: view,
	}
}
1148761
func (u *URLQueryParameters) Add(Key string, value string) {
	u.params = append(u.params, URLQueryParameter{Key: Key, Value: value})
}
912574
func (s *HlsManifest) SetUrl(v string) *HlsManifest {
	s.Url = &v
	return s
}
615673
func (a *ContinueRequestArgs) SetURL(url string) *ContinueRequestArgs {
	a.URL = &url
	return a
}
1125951
func (s *UploadMetadata) SetUploadUrl(v string) *UploadMetadata {
	s.UploadUrl = &v
	return s
}
1125777
func (s *ListWebhookItem) SetUrl(v string) *ListWebhookItem {
	s.Url = &v
	return s
}
276925
func NewURLBuilder(root *url.URL, relative bool) *URLBuilder {
	return &URLBuilder{
		root:     root,
		router:   Router(),
		relative: relative,
	}
}
944987
func (p *PathSpec) AbsURL(in string, addLanguage bool) string {
	url, err := url.Parse(in)
	if err != nil {
		return in
	}

	if url.IsAbs() || strings.HasPrefix(in, "//") {
		return in
	}

	var baseURL string
	if strings.HasPrefix(in, "/") {
		u := p.BaseURL.URL()
		u.Path = ""
		baseURL = u.String()
	} else {
		baseURL = p.BaseURL.String()
	}

	if addLanguage {
		prefix := p.GetLanguagePrefix()
		if prefix != "" {
			hasPrefix := false
			// avoid adding language prefix if already present
			if strings.HasPrefix(in, "/") {
				hasPrefix = strings.HasPrefix(in[1:], prefix)
			} else {
				hasPrefix = strings.HasPrefix(in, prefix)
			}

			if !hasPrefix {
				addSlash := in == "" || strings.HasSuffix(in, "/")
				in = path.Join(prefix, in)

				if addSlash {
					in += "/"
				}
			}
		}
	}
	return MakePermalink(baseURL, in).String()
}
287841
func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs {
	a.URL = &url
	return a
}