code: func New(o Options) (a *Astilectron, err error) {
  	// Validate the OS
  	if !IsValidOS(runtime.GOOS) {
  		err = errors.Wrapf(err, "OS %s is invalid", runtime.GOOS)
  		return
  	}
  
  	// Init
  	a = &Astilectron{
  		canceller:   asticontext.NewCanceller(),
  		channelQuit: make(chan bool),
  		dispatcher:  newDispatcher(),
  		displayPool: newDisplayPool(),
  		executer:    DefaultExecuter,
  		identifier:  newIdentifier(),
  		options:     o,
  		provisioner: DefaultProvisioner,
  	}
  
  	// Set paths
  	if a.paths, err = newPaths(runtime.GOOS, runtime.GOARCH, o); err != nil {
  		err = errors.Wrap(err, "creating new paths failed")
  		return
  	}
  
  	// Add default listeners
  	a.On(EventNameAppCmdStop, func(e Event) (deleteListener bool) {
  		a.Stop()
  		return
  	})
  	a.On(EventNameDisplayEventAdded, func(e Event) (deleteListener bool) {
  		a.displayPool.update(e.Displays)
  		return
  	})
  	a.On(EventNameDisplayEventMetricsChanged, func(e Event) (deleteListener bool) {
  		a.displayPool.update(e.Displays)
  		return
  	})
  	a.On(EventNameDisplayEventRemoved, func(e Event) (deleteListener bool) {
  		a.displayPool.update(e.Displays)
  		return
  	})
  	return
  }
docs: // New creates a new Astilectron instance