code: func promoteLogdogAliases(b *buildbot.Build) {
  	// If this is a LogDog-only build, we want to promote the LogDog links.
  	if loc, ok := b.PropertyValue("log_location").(string); ok && strings.HasPrefix(loc, "logdog://") {
  		linkMap := map[string]string{}
  		for i := range b.Steps {
  			promoteLogDogLinks(&b.Steps[i], i == 0, linkMap)
  		}
  
  		// Update "b.Logs". This field is part of BuildBot, and is the amalgamation
  		// of all logs in the build's steps. Since each log is out of context of its
  		// original step, we can't apply the promotion logic; instead, we will use
  		// the link map to map any old URLs that were matched in "promoteLogDogLinks"
  		// to their new URLs.
  		for i := range b.Logs {
  			l := &b.Logs[i]
  			if newURL, ok := linkMap[l.URL]; ok {
  				l.URL = newURL
  			}
  		}
  	}
  }
docs: // promoteLogdogAliases promotes LogDog links to first-class links.