code: func NewWithConfig(cfg *config.Config) (*Framework, error) {
  	c := Framework{
  		Config: cfg,
  		mu:     &sync.Mutex{},
  	}
  
  	if c.ProvisionMode() {
  		c.ConfigureProvisioning()
  	}
  
  	err := c.SetupLogging(false)
  	if err != nil {
  		return &c, fmt.Errorf("could not set up logging: %s", err)
  	}
  
  	err = c.setupSecurity()
  	if err != nil {
  		return &c, fmt.Errorf("could not set up security framework: %s", err)
  	}
  
  	config.Mutate(cfg, c.Logger("config"))
  
  	return &c, nil
  }
docs: // NewWithConfig creates a new instance of the framework with the supplied config instance