code: func GetAllReplicaSets(deployment *apps.Deployment, c appsclient.AppsV1Interface) ([]*apps.ReplicaSet, []*apps.ReplicaSet, *apps.ReplicaSet, error) {
  	rsList, err := ListReplicaSets(deployment, RsListFromClient(c))
  	if err != nil {
  		return nil, nil, nil, err
  	}
  	oldRSes, allOldRSes := FindOldReplicaSets(deployment, rsList)
  	newRS := FindNewReplicaSet(deployment, rsList)
  	return oldRSes, allOldRSes, newRS, nil
  }
docs: // GetAllReplicaSets returns the old and new replica sets targeted by the given Deployment. It gets PodList and ReplicaSetList from client interface.
  // Note that the first set of old replica sets doesn't include the ones with no pods, and the second set of old replica sets include all old replica sets.
  // The third returned value is the new replica set, and it may be nil if it doesn't exist yet.