code: func WriteContainerMetadataResponse(w http.ResponseWriter, containerID string, state dockerstate.TaskEngineState) {
  	containerResponse, err := NewContainerResponse(containerID, state)
  	if err != nil {
  		errResponseJSON, _ := json.Marshal("Unable to generate metadata for container '" + containerID + "'")
  		utils.WriteJSONToResponse(w, http.StatusBadRequest, errResponseJSON, utils.RequestTypeContainerMetadata)
  		return
  	}
  
  	responseJSON, _ := json.Marshal(containerResponse)
  	utils.WriteJSONToResponse(w, http.StatusOK, responseJSON, utils.RequestTypeContainerMetadata)
  }
docs: // WriteContainerMetadataResponse writes the container metadata to response writer.