Onload Job
Esta página aún no está disponible en tu idioma.
The einar-cli allows you to generate custom onload jobs by automatically creating the necessary files and imports to manage your onload processes. These onload jobs will be loaded only after all their dependencies have been satisfied and will be executed just once when the application is run.
👨💻 Generate a New OnloadJob
Inside your project directory, run the following command to create a new custom onload job:
einar generate onload-job my-job-nameHere’s an example of how the generated code will look:
func init() { ioc.Registry(myJobName)}func myJobName() { //execute your onload job here}