drivers/google/compute_util.go
func (c *ComputeUtil) waitForOp(opGetter func() (*raw.Operation, error)) error {
	for {
		op, err := opGetter()
		if err != nil {
			return err
		}

		log.Debugf("Operation %q status: %s", op.Name, op.Status)
		if op.Status == "DONE" {
			if op.Error != nil {
				return fmt.Errorf("Operation error: %v", *op.Error.Errors[0])
			}
			break
		}
		time.Sleep(1 * time.Second)
	}
	return nil
}
func (c *ComputeUtil) waitForOp(opGetter func() (*raw.Operation, error)) error {
	for {
		op, err := opGetter()
		if err != nil {
			return err
		}

		log.Debugf("Operation %q status: %s", op.Name, op.Status)
		if op.Status == "DONE" {
			if op.Error != nil {
				return fmt.Errorf("Operation error: %v", *op.Error.Errors[0])
			}
			break
		}
		time.Sleep(1 * time.Second)
	}
	return nil
}
func ( c * ComputeUtil ) waitForOp ( opGetter func ( ) ( * raw . Operation , error ) ) error { for { op , err := opGetter ( ) if err != nil { return err } log . Debugf ( " " , op . Name , op . Status ) if op . Status == " " { if op . Error != nil { return fmt . Errorf ( " " , * op . Error . Errors [ 0 ] ) } break } time . Sleep ( 1 * time . Second ) } return nil }
// waitForOp waits for the operation to finish.
waitForOp waits for the operation to finish .