code: func (o RenameContextOptions) RunRenameContext(out io.Writer) error {
  	config, err := o.configAccess.GetStartingConfig()
  	if err != nil {
  		return err
  	}
  
  	configFile := o.configAccess.GetDefaultFilename()
  	if o.configAccess.IsExplicitFile() {
  		configFile = o.configAccess.GetExplicitFile()
  	}
  
  	context, exists := config.Contexts[o.contextName]
  	if !exists {
  		return fmt.Errorf("cannot rename the context %q, it's not in %s", o.contextName, configFile)
  	}
  
  	_, newExists := config.Contexts[o.newName]
  	if newExists {
  		return fmt.Errorf("cannot rename the context %q, the context %q already exists in %s", o.contextName, o.newName, configFile)
  	}
  
  	config.Contexts[o.newName] = context
  	delete(config.Contexts, o.contextName)
  
  	if config.CurrentContext == o.contextName {
  		config.CurrentContext = o.newName
  	}
  
  	if err := clientcmd.ModifyConfig(o.configAccess, *config, true); err != nil {
  		return err
  	}
  
  	fmt.Fprintf(out, "Context %q renamed to %q.\n", o.contextName, o.newName)
  	return nil
  }
docs: // RunRenameContext performs the execution for 'config rename-context' sub command