code: func extractDetails(msg *bbv1.ApiCommonBuildMessage) (info string, botID string, err error) {
  	var resultDetails struct {
  		// TODO(nodir,iannucci): define a proto for build UI data
  		UI struct {
  			Info string `json:"info"`
  		} `json:"ui"`
  		Swarming struct {
  			TaskResult struct {
  				BotID string `json:"bot_id"`
  			} `json:"task_result"`
  			BotDimensions struct {
  				ID []string `json:"id"`
  			} `json:"bot_dimensions"`
  		} `json:"swarming"`
  	}
  	if msg.ResultDetailsJson != "" {
  		err = json.NewDecoder(strings.NewReader(msg.ResultDetailsJson)).Decode(&resultDetails)
  		info = resultDetails.UI.Info
  		botID = resultDetails.Swarming.TaskResult.BotID
  		if botID == "" && len(resultDetails.Swarming.BotDimensions.ID) > 0 {
  			botID = resultDetails.Swarming.BotDimensions.ID[0]
  		}
  	}
  	return
  }
docs: // extractDetails extracts the following from a build message's ResultDetailsJson:
  // * Build Info Text
  // * Swarming Bot ID
  // TODO(hinoka, nodir): Delete after buildbucket v2.