code: func (b *ViewerURLBuilder) BuildLink(l *miloProto.Link) *ui.Link {
  	switch t := l.Value.(type) {
  	case *miloProto.Link_LogdogStream:
  		ls := t.LogdogStream
  
  		server := ls.Server
  		if server == "" {
  			server = b.Host
  		}
  
  		prefix := types.StreamName(ls.Prefix)
  		if prefix == "" {
  			prefix = b.Prefix
  		}
  
  		u := viewer.GetURL(server, b.Project, prefix.Join(types.StreamName(ls.Name)))
  		link := ui.NewLink(l.Label, u, fmt.Sprintf("logdog link for %s", l.Label))
  		if link.Label == "" {
  			link.Label = ls.Name
  		}
  		return link
  
  	case *miloProto.Link_Url:
  		link := ui.NewLink(l.Label, t.Url, fmt.Sprintf("step link for %s", l.Label))
  		if link.Label == "" {
  			link.Label = "unnamed"
  		}
  		return link
  
  	default:
  		// Don't know how to render.
  		return nil
  	}
  }
docs: // BuildLink implements URLBuilder.