code: func statefulSetHistory(
  	apps clientappsv1.AppsV1Interface,
  	namespace, name string) (*appsv1.StatefulSet, []*appsv1.ControllerRevision, error) {
  	sts, err := apps.StatefulSets(namespace).Get(name, metav1.GetOptions{})
  	if err != nil {
  		return nil, nil, fmt.Errorf("failed to retrieve Statefulset %s: %s", name, err.Error())
  	}
  	selector, err := metav1.LabelSelectorAsSelector(sts.Spec.Selector)
  	if err != nil {
  		return nil, nil, fmt.Errorf("failed to create selector for StatefulSet %s: %s", name, err.Error())
  	}
  	accessor, err := meta.Accessor(sts)
  	if err != nil {
  		return nil, nil, fmt.Errorf("failed to obtain accessor for StatefulSet %s: %s", name, err.Error())
  	}
  	history, err := controlledHistoryV1(apps, namespace, selector, accessor)
  	if err != nil {
  		return nil, nil, fmt.Errorf("unable to find history controlled by StatefulSet %s: %v", name, err)
  	}
  	return sts, history, nil
  }
docs: // statefulSetHistory returns the StatefulSet named name in namespace and all ControllerRevisions in its history.