// resetConfig is the run action when we are resetting attributes.
349440
func (c *configCommand) resetConfig(client applicationAPI, ctx *cmd.Context) error {
	var err error
	if client.BestAPIVersion() < 6 {
		err = client.Unset(c.applicationName, c.resetKeys)
	} else {
		err = client.UnsetApplicationConfig(c.branchName, c.applicationName, c.resetKeys)
	}
	return block.ProcessBlockedError(err, block.BlockChange)
}
264188
func (f *AuthSourceFile) SetConfig(cfg core.Conversion) error {
	return f.file.Section("config").ReflectFrom(cfg)
}
157976
func (h *LangHandler) reset(init *InitializeParams) error {
	for _, k := range init.Capabilities.TextDocument.Completion.CompletionItemKind.ValueSet {
		if k == lsp.CIKConstant {
			CIKConstantSupported = lsp.CIKConstant
			break
		}
	}

	if util.IsURI(lsp.DocumentURI(init.InitializeParams.RootPath)) {
		log.Printf("Passing an initialize rootPath URI (%q) is deprecated. Use rootUri instead.", init.InitializeParams.RootPath)
	}

	h.mu.Lock()
	defer h.mu.Unlock()
	if err := h.HandlerCommon.Reset(init.Root()); err != nil {
		return err
	}
	if !h.HandlerShared.Shared {
		// Only reset the shared data if this lang server is running
		// by itself.
		if err := h.HandlerShared.Reset(!init.NoOSFileSystemAccess); err != nil {
			return err
		}
	}
	config := h.DefaultConfig.Apply(init.InitializationOptions)
	h.config = &config
	h.init = init
	h.cancel = &cancel{}
	h.resetCaches(false)
	return nil
}
311815
func (z *Writer) Reset(w io.Writer) {
	z.init(w, z.level)
}
258868
func (b *ScriptBuilder) Reset() *ScriptBuilder {
	b.script = b.script[0:0]
	b.err = nil
	return b
}
244828
func (db *DB) Reset() {
	db.maxAccountModelID = 0
	db.accounts = make(map[int]*AccountModel)
	db.bottles = make(map[int][]*BottleModel)
}
667670
func (c *Canceller) Reset() {
	c.ctx, c.cancel = context.WithCancel(context.Background())
}
19492
func (s *server) SetConfig(c context.Context, req *logdog.SetConfigRequest) (*empty.Empty, error) {
	se := config.Settings{
		BigTableServiceAccountJSON: req.StorageServiceAccountJson,
	}
	if err := se.Validate(); err != nil {
		log.Fields{
			log.ErrorKey: err,
		}.Errorf(c, "New configuration did not validate.")
		return nil, grpcutil.Errf(codes.InvalidArgument, "config did not validate: %v", err)
	}

	if err := se.Store(c, "setConfig endpoint"); err != nil {
		log.Fields{
			log.ErrorKey: err,
		}.Errorf(c, "Failed to store new configuration.")
		return nil, grpcutil.Internal
	}
	return &empty.Empty{}, nil
}
783004
func resetConfigDir(configPathDir, pkiPathDir string) {
	dirsToClean := []string{
		filepath.Join(configPathDir, kubeadmconstants.ManifestsSubDirName),
		pkiPathDir,
	}
	fmt.Printf("[reset] Deleting contents of config directories: %v\n", dirsToClean)
	for _, dir := range dirsToClean {
		if err := cleanDir(dir); err != nil {
			klog.Errorf("[reset] Failed to remove directory: %q [%v]\n", dir, err)
		}
	}

	filesToClean := []string{
		filepath.Join(configPathDir, kubeadmconstants.AdminKubeConfigFileName),
		filepath.Join(configPathDir, kubeadmconstants.KubeletKubeConfigFileName),
		filepath.Join(configPathDir, kubeadmconstants.KubeletBootstrapKubeConfigFileName),
		filepath.Join(configPathDir, kubeadmconstants.ControllerManagerKubeConfigFileName),
		filepath.Join(configPathDir, kubeadmconstants.SchedulerKubeConfigFileName),
	}
	fmt.Printf("[reset] Deleting files: %v\n", filesToClean)
	for _, path := range filesToClean {
		if err := os.RemoveAll(path); err != nil {
			klog.Errorf("[reset] Failed to remove file: %q [%v]\n", path, err)
		}
	}
}
289124
func (session *SafeSession) Reset() {
	if session == nil || session.Session == nil {
		return
	}
	session.mu.Lock()
	defer session.mu.Unlock()
	session.mustRollback = false
	session.autocommitState = notAutocommittable
	session.Session.InTransaction = false
	session.SingleDb = false
	session.ShardSessions = nil
}
649869
func (c *CompletionManager) Reset() {
	c.selected = -1
	c.verticalScroll = 0
	c.Update(*NewDocument())
	return
}
200334
func reset() {
	registeredVersions = map[unversioned.GroupVersion]struct{}{}
	enabledVersions = map[unversioned.GroupVersion]struct{}{}
	groupMetaMap = map[string]*apimachinery.GroupMeta{}

}
215751
func DefaultConfig() Config {
	return Config{
		AllowMethods:     []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"},
		AllowHeaders:     []string{"Origin", "Content-Length", "Content-Type"},
		AllowCredentials: false,
		MaxAge:           12 * time.Hour,
	}
}
1353227
func (c *Client) ReloadConfig(config *Config) error {
	c.rpcLimiter.Store(rate.NewLimiter(config.RPCRate, config.RPCMaxBurst))
	return nil
}
246333
func (fmd *FakeMysqlDaemon) ReinitConfig(ctx context.Context, cnf *mysqlctl.Mycnf) error {
	return nil
}
346776
func (mw *Writer) Reset(wr io.Writer) {
	*mw = Writer{
		wr:   wr,
		bw:   mw.bw,
		bb:   mw.bb,
		cnts: mw.cnts,
	}
	return
}
908116
func (c *Cacher) Reset(data map[string]interface{}) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.data = data
}