// Force forces the use of a specific version
509902
func Force(version string) error {
	ver, err := go_version.NewVersion(version)
	if err != nil {
		return err
	}
	updateVersion(ver)
	return nil
}
990301
func (s *RemoveTargetsInput) SetForce(v bool) *RemoveTargetsInput {
	s.Force = &v
	return s
}
949227
func (sp *SendAudio) ForceReply(fr ForceReply) *SendAudio {
	var rmi ReplyMarkupInt = fr
	sp.ReplyMarkup = &rmi
	return sp
}
1154948
func (s *ReleaseServer) performUpdateForce(req *services.UpdateReleaseRequest) (*services.UpdateReleaseResponse, error) {
	// find the last release with the given name
	oldRelease, err := s.env.Releases.Last(req.Name)
	if err != nil {
		return nil, err
	}

	res := &services.UpdateReleaseResponse{}

	newRelease, err := s.prepareRelease(&services.InstallReleaseRequest{
		Chart:        req.Chart,
		Values:       req.Values,
		DryRun:       req.DryRun,
		Name:         req.Name,
		DisableHooks: req.DisableHooks,
		Namespace:    oldRelease.Namespace,
		ReuseName:    true,
		Timeout:      req.Timeout,
		Wait:         req.Wait,
	})
	if err != nil {
		s.Log("failed update prepare step: %s", err)
		// On dry run, append the manifest contents to a failed release. This is
		// a stop-gap until we can revisit an error backchannel post-2.0.
		if req.DryRun && strings.HasPrefix(err.Error(), "YAML parse error") {
			err = fmt.Errorf("%s\n%s", err, newRelease.Manifest)
		}
		return res, err
	}

	// update new release with next revision number so as to append to the old release's history
	newRelease.Version = oldRelease.Version + 1
	res.Release = newRelease

	if req.DryRun {
		s.Log("dry run for %s", newRelease.Name)
		res.Release.Info.Description = "Dry run complete"
		return res, nil
	}

	// From here on out, the release is considered to be in Status_DELETING or Status_DELETED
	// state. There is no turning back.
	oldRelease.Info.Status.Code = release.Status_DELETING
	oldRelease.Info.Deleted = timeconv.Now()
	oldRelease.Info.Description = "Deletion in progress (or silently failed)"
	s.recordRelease(oldRelease, true)

	// pre-delete hooks
	if !req.DisableHooks {
		if err := s.execHook(oldRelease.Hooks, oldRelease.Name, oldRelease.Namespace, hooks.PreDelete, req.Timeout); err != nil {
			return res, err
		}
	} else {
		s.Log("hooks disabled for %s", req.Name)
	}

	// delete manifests from the old release
	_, errs := s.ReleaseModule.Delete(oldRelease, nil, s.env)

	oldRelease.Info.Status.Code = release.Status_DELETED
	oldRelease.Info.Description = "Deletion complete"
	s.recordRelease(oldRelease, true)

	if len(errs) > 0 {
		es := make([]string, 0, len(errs))
		for _, e := range errs {
			s.Log("error: %v", e)
			es = append(es, e.Error())
		}
		return res, fmt.Errorf("Upgrade --force successfully deleted the previous release, but encountered %d error(s) and cannot continue: %s", len(es), strings.Join(es, "; "))
	}

	// post-delete hooks
	if !req.DisableHooks {
		if err := s.execHook(oldRelease.Hooks, oldRelease.Name, oldRelease.Namespace, hooks.PostDelete, req.Timeout); err != nil {
			return res, err
		}
	}

	// pre-install hooks
	if !req.DisableHooks {
		if err := s.execHook(newRelease.Hooks, newRelease.Name, newRelease.Namespace, hooks.PreInstall, req.Timeout); err != nil {
			return res, err
		}
	}

	s.recordRelease(newRelease, false)
	if err := s.ReleaseModule.Update(oldRelease, newRelease, req, s.env); err != nil {
		msg := fmt.Sprintf("Upgrade %q failed: %s", newRelease.Name, err)
		s.Log("warning: %s", msg)
		newRelease.Info.Status.Code = release.Status_FAILED
		newRelease.Info.Description = msg
		s.recordRelease(newRelease, true)
		return res, err
	}

	// post-install hooks
	if !req.DisableHooks {
		if err := s.execHook(newRelease.Hooks, newRelease.Name, newRelease.Namespace, hooks.PostInstall, req.Timeout); err != nil {
			msg := fmt.Sprintf("Release %q failed post-install: %s", newRelease.Name, err)
			s.Log("warning: %s", msg)
			newRelease.Info.Status.Code = release.Status_FAILED
			newRelease.Info.Description = msg
			s.recordRelease(newRelease, true)
			return res, err
		}
	}

	newRelease.Info.Status.Code = release.Status_DEPLOYED
	if req.Description == "" {
		newRelease.Info.Description = "Upgrade complete"
	} else {
		newRelease.Info.Description = req.Description
	}
	s.recordRelease(newRelease, true)

	return res, nil
}
231450
func (driver *Driver) Version() (file.Version, error) {
	versions, err := driver.Versions()
	if len(versions) == 0 {
		return 0, err
	}
	return versions[0], err
}
649265
func (tr Row) ForceFloat(nn int) (val float64) {
	val, _ = tr.FloatErr(nn)
	return
}
1109066
func (c *RPCClient) ForceLeave(node string) error {
	header := requestHeader{
		Command: forceLeaveCommand,
		Seq:     c.getSeq(),
	}
	req := forceLeaveRequest{
		Node: node,
	}
	return c.genericRPC(&header, &req, nil)
}
484852
func (sp *SendPhoto) ForceReply(fr ForceReply) *SendPhoto {
	var rmi ReplyMarkupInt = fr
	sp.ReplyMarkup = &rmi
	return sp
}
174057
func (s *DeleteServiceInput) SetForce(v bool) *DeleteServiceInput {
	s.Force = &v
	return s
}
591488
func (h *Client) version(ctx context.Context, req *rls.GetVersionRequest) (*rls.GetVersionResponse, error) {
	c, err := h.connect(ctx)
	if err != nil {
		return nil, err
	}
	defer c.Close()

	rlc := rls.NewReleaseServiceClient(c)
	return rlc.GetVersion(ctx, req)
}
374959
func (s *DeleteJobExecutionInput) SetForce(v bool) *DeleteJobExecutionInput {
	s.Force = &v
	return s
}
308362
func (p *PointsWriter) ForceError(err error) {
	p.mu.Lock()
	p.Err = err
	p.mu.Unlock()
}
874109
func (c *conn) forceWrite(b []byte) error {
	c.mu.Lock()
	defer c.mu.Unlock()

	_, err := c.buf.Write(b)
	if err != nil {
		return err
	}

	return c.buf.Flush()
}
307398
func (s *Service) ForceRun(ctx context.Context, taskID influxdb.ID, scheduledFor int64) (*influxdb.Run, error) {
	var r *influxdb.Run
	err := s.kv.Update(ctx, func(tx Tx) error {
		run, err := s.forceRun(ctx, tx, taskID, scheduledFor)
		if err != nil {
			return err
		}
		r = run
		return nil
	})
	return r, err
}
1258437
func (s *CancelJobInput) SetForce(v bool) *CancelJobInput {
	s.Force = &v
	return s
}
967505
func (s *BacktrackDBClusterInput) SetForce(v bool) *BacktrackDBClusterInput {
	s.Force = &v
	return s
}
324382
func (fs *KBFSOpsStandard) ForceFastForward(ctx context.Context) {
	timeTrackerDone := fs.longOperationDebugDumper.Begin(ctx)
	defer timeTrackerDone()

	fs.opsLock.Lock()
	defer fs.opsLock.Unlock()

	fs.log.CDebugf(ctx, "Forcing fast-forwards for %d folders", len(fs.ops))
	for _, fbo := range fs.ops {
		fbo.ForceFastForward(ctx)
	}
}