code: func (c *EtcdGroupService) GroupAddMember(ctx context.Context, groupName, uid string) error {
  	var etcdRes *clientv3.TxnResponse
  	kv, err := getGroupKV(ctx, groupName)
  	if err != nil {
  		return err
  	}
  
  	ctxT, cancel := context.WithTimeout(ctx, transactionTimeout)
  	defer cancel()
  	if kv.Lease != 0 {
  		etcdRes, err = clientInstance.Txn(ctxT).
  			If(clientv3.Compare(clientv3.CreateRevision(groupKey(groupName)), ">", 0),
  				clientv3.Compare(clientv3.CreateRevision(memberKey(groupName, uid)), "=", 0)).
  			Then(clientv3.OpPut(memberKey(groupName, uid), "", clientv3.WithLease(clientv3.LeaseID(kv.Lease)))).
  			Commit()
  	} else {
  		etcdRes, err = clientInstance.Txn(ctxT).
  			If(clientv3.Compare(clientv3.CreateRevision(groupKey(groupName)), ">", 0),
  				clientv3.Compare(clientv3.CreateRevision(memberKey(groupName, uid)), "=", 0)).
  			Then(clientv3.OpPut(memberKey(groupName, uid), "")).
  			Commit()
  	}
  
  	if err != nil {
  		return err
  	}
  	if !etcdRes.Succeeded {
  		return constants.ErrMemberAlreadyExists
  	}
  	return nil
  }
docs: // GroupAddMember adds UID to group