code: func maxRevision(histories []*apps.ControllerRevision) int64 {
  	max := int64(0)
  	for _, history := range histories {
  		if history.Revision > max {
  			max = history.Revision
  		}
  	}
  	return max
  }
docs: // maxRevision returns the max revision number of the given list of histories